Skip to content

Commit e6c7b42

Browse files
committed
Set corpusVersion in compilation/test.
This prevents the "object vector is already compiled in this run" error when testing the Dotty compilation.
1 parent d9f7966 commit e6c7b42

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
package scala.tools.benchmark
22

3-
import scala.tools.nsc.ScalacBenchmarkStandalone
3+
import scala.tools.nsc.ScalacBenchmark
44
import org.junit.Test
55

66
class BenchmarkTest {
7-
@Test def compilesOK =
8-
ScalacBenchmarkStandalone.main(Array("../corpus/vector", "1"))
7+
@Test def compilesOK() = {
8+
val bench = new ScalacBenchmark
9+
bench.source = "../corpus/vector"
10+
bench.corpusVersion = "latest"
11+
bench.initTemp()
12+
bench.compileImpl()
13+
bench.clearTemp()
14+
}
915
}

0 commit comments

Comments
 (0)