Skip to content

Commit 3d3cff0

Browse files
committed
Enable emmiting byte code for all tests. Compile Dotty.
Hurray!
1 parent e136027 commit 3d3cff0

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

test/dotc/tests.scala

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,16 @@ class tests extends CompilerTest {
2323
"-Ycheck:tailrec,resolveSuper,mixin,restoreScopes",
2424
"-d", defaultOutputDir
2525
)
26-
val doEmitBytecode = List("-Ystop-before:terminal")
27-
val failedbyName = List("-Ystop-before:collectEntryPoints") // #288
2826
val testPickling = List("-Xprint-types", "-Ytest-pickler", "-Ystop-after:pickler")
2927

30-
val failedOther = List("-Ystop-before:collectEntryPoints") // some non-obvious reason. need to look deeper
3128
val twice = List("#runs", "2")
3229
val staleSymbolError: List[String] = List()
3330

3431
val allowDeepSubtypes = defaultOptions diff List("-Yno-deep-subtypes")
3532
val allowDoubleBindings = defaultOptions diff List("-Yno-double-bindings")
3633

3734
val testsDir = "./tests/"
38-
val posDir = testsDir + "pos/"
35+
val posDir = testsDir + "pos/"
3936
val posSpecialDir = testsDir + "pos-special/"
4037
val negDir = testsDir + "neg/"
4138
val newDir = testsDir + "new/"
@@ -50,7 +47,7 @@ class tests extends CompilerTest {
5047
@Test def pickle_ast = compileDir(dotcDir, "ast", testPickling)
5148

5249
//@Test def pickle_core = compileDir(dotcDir, "core", testPickling, xerrors = 2) // two spurious comparison errors in Types and TypeOps
53-
50+
5451
@Test def pos_t2168_pat = compileFile(posDir, "t2168", twice)
5552
@Test def pos_erasure = compileFile(posDir, "erasure", twice)
5653
@Test def pos_Coder() = compileFile(posDir, "Coder", twice)
@@ -121,7 +118,7 @@ class tests extends CompilerTest {
121118
@Test def neg_tailcall = compileFile(negTailcallDir, "tailrec", xerrors = 7)
122119
@Test def neg_tailcall2 = compileFile(negTailcallDir, "tailrec-2", xerrors = 2)
123120
@Test def neg_tailcall3 = compileFile(negTailcallDir, "tailrec-3", xerrors = 2)
124-
121+
125122
@Test def neg_t1279a = compileFile(negDir, "t1279a", xerrors = 1)
126123
@Test def neg_t1843_variances = compileFile(negDir, "t1843-variances", xerrors = 1)
127124
@Test def neg_t2660_ambi = compileFile(negDir, "t2660", xerrors = 2)
@@ -142,22 +139,14 @@ class tests extends CompilerTest {
142139
@Test def neg_instantiateAbstract = compileFile(negDir, "instantiateAbstract", xerrors = 8)
143140
@Test def neg_selfInheritance = compileFile(negDir, "selfInheritance", xerrors = 5)
144141

145-
@Test def dotc = compileDir(toolsDir, "dotc", failedOther)(allowDeepSubtypes ++ twice) // see dotc_core
146-
@Test def dotc_ast = compileDir(dotcDir, "ast", failedOther ++ twice)
147-
//similar to dotc_core_pickling but for another anon class. Still during firstTransform
142+
@Test def dotc = compileDir(toolsDir, "dotc", "-deep" :: allowDeepSubtypes ++ twice) // note the -deep argument
143+
144+
@Test def dotc_ast = compileDir(dotcDir, "ast")
148145
@Test def dotc_config = compileDir(dotcDir, "config")
149-
@Test def dotc_core = compileDir(dotcDir, "core", failedOther)("-Yno-double-bindings" :: allowDeepSubtypes)// twice omitted to make tests run faster
150-
// error: error while loading ConstraintHandling$$anon$1$,
151-
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/core/ConstraintHandling$$anon$1.class)'
152-
// has location not matching its contents: contains class $anon
146+
@Test def dotc_core = compileDir(dotcDir, "core")("-Yno-double-bindings" :: allowDeepSubtypes)// twice omitted to make tests run faster
147+
153148

154-
@Test def dotc_core_pickling = compileDir(coreDir, "pickling", failedOther)(allowDeepSubtypes)// twice omitted to make tests run faster
155-
// exception caught when loading class ClassfileParser$$anon$1: dotty.tools.dotc.core.Denotations$NotDefinedHere:
156-
// demanding denotation of module class ClassfileParser$$anon$1$ at phase frontend(1) outside defined interval:
157-
// defined periods are Period(31..36, run = 2) Period(3..24, run = 2) Period(25..26, run = 2)
158-
// Period(27..28, run = 2) Period(29..29, run = 2) Period(30..30, run = 2)
159-
// inside FirstTransform at dotty.tools.dotc.transform.FirstTransform.transform(FirstTransform.scala:33)
160-
// weird.
149+
@Test def dotc_core_pickling = compileDir(coreDir, "pickling")(allowDeepSubtypes)// twice omitted to make tests run faster
161150

162151
@Test def dotc_transform = compileDir(dotcDir, "transform")// twice omitted to make tests run faster
163152

@@ -167,19 +156,16 @@ class tests extends CompilerTest {
167156

168157
@Test def dotc_reporting = compileDir(dotcDir, "reporting") // twice omitted to make tests run faster
169158

170-
@Test def dotc_typer = compileDir(dotcDir, "typer", failedOther)// twice omitted to make tests run faster
159+
@Test def dotc_typer = compileDir(dotcDir, "typer")// twice omitted to make tests run faster
171160
// error: error while loading Checking$$anon$2$,
172161
// class file 'target/scala-2.11/dotty_2.11-0.1-SNAPSHOT.jar(dotty/tools/dotc/typer/Checking$$anon$2.class)'
173162
// has location not matching its contents: contains class $anon
174163

175-
@Test def dotc_util = compileDir(dotcDir, "util", failedOther ++ twice)
176-
// java.lang.ClassCastException: dotty.tools.dotc.core.Types$NoType$ cannot be cast to dotty.tools.dotc.core.Types$ClassInfo
177-
// at dotty.tools.dotc.core.SymDenotations$ClassDenotation.classInfo(SymDenotations.scala:1026)
178-
// at dotty.tools.dotc.transform.ExtensionMethods.transform(ExtensionMethods.scala:38)
164+
@Test def dotc_util = compileDir(dotcDir, "util") // twice omitted to make tests run faster
179165

180-
@Test def tools_io = compileDir(toolsDir, "io", failedOther ++ twice) // inner class has symbol <none>
166+
@Test def tools_io = compileDir(toolsDir, "io") // inner class has symbol <none>
181167

182-
@Test def helloWorld = compileFile(posDir, "HelloWorld", twice)
168+
@Test def helloWorld = compileFile(posDir, "HelloWorld")
183169
@Test def labels = compileFile(posDir, "Labels", twice)
184170
//@Test def tools = compileDir(dottyDir, "tools", "-deep" :: Nil)(allowDeepSubtypes)
185171

@@ -196,6 +182,5 @@ class tests extends CompilerTest {
196182

197183
val javaDir = "./tests/pos/java-interop/"
198184
@Test def java_all = compileFiles(javaDir, twice)
199-
200185
//@Test def dotc_compilercommand = compileFile(dotcDir + "config/", "CompilerCommand")
201186
}

0 commit comments

Comments
 (0)