Skip to content

Commit 600c947

Browse files
committed
Use re2s in the unit test for the compiler driver and fix dotty driver
1 parent 72e60d5 commit 600c947

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

compilation/src/main/dotc/scala/tools/benchmark/BenchmarkDriver.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ trait BenchmarkDriver extends BaseBenchmarkDriver {
1515
ctx.setSetting(ctx.settings.migration, false)
1616
ctx.setSetting(ctx.settings.outputDir, dotty.tools.io.AbstractFile.getDirectory(tempDir.getAbsolutePath))
1717
ctx.setSetting(ctx.settings.language, List("Scala2"))
18+
ctx.setSetting(ctx.settings.YdropComments, true)
1819
val compiler = new dotty.tools.dotc.Compiler
1920
val reporter = dotty.tools.dotc.Bench.doCompile(compiler, allArgs)
2021
assert(!reporter.hasErrors)

compilation/src/test/scala/scala/tools/benchmark/BenchmarkTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.junit.Test
66
class BenchmarkTest {
77
@Test def compilesOK() = {
88
val bench = new ScalacBenchmark
9-
bench.source = "../corpus/vector"
9+
bench.source = "../corpus/re2s"
1010
bench.corpusVersion = "latest"
1111
bench.initTemp()
1212
bench.compileImpl()

corpus/re2s/a311ea0/java/util/regex/Parser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ class Parser(wholeRegexp: String, _flags: Int) {
733733
case '*' | '+' | '?' =>
734734
repeatPos = t.pos()
735735
val op: Int =
736-
t.pop match {
736+
t.pop() match {
737737
case '*' => ROP.STAR
738738
case '+' => ROP.PLUS
739739
case '?' => ROP.QUEST

project/build.sbt

Whitespace-only changes.

0 commit comments

Comments
 (0)