Skip to content

Commit

Permalink
Enable backend specific tests. Flag those that fail
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkDimius committed Dec 16, 2014
1 parent c3bdd0b commit 4c11203
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
Empty file added out/.keep
Empty file.
40 changes: 25 additions & 15 deletions test/dotc/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ class tests extends CompilerTest {
implicit val defaultOptions = noCheckOptions ++ List(
"-Yno-deep-subtypes",
"-Ycheck:resolveSuper,mixin,restoreScopes",
"-dest", "./out/",
"-Ystop-before:collectEntryPoints"
"-d", "./out/"
)

val doEmitBytecode = List("-Ystop-before:terminal")
val failedbyName = List("-Ystop-before:collectEntryPoints") // #288
val failedUnderscore = List("-Ystop-before:collectEntryPoints") // #289

val failedOther = List("-Ystop-before:collectEntryPoints") // some non-obvious reason. need to look deeper



val twice = List("#runs", "2", "-YnoDoubleBindings")

Expand All @@ -32,7 +37,6 @@ class tests extends CompilerTest {
val newDir = "./tests/new/"
val dotcDir = "./src/dotty/"


@Test def pos_t2168_pat = compileFile(posDir, "t2168")
@Test def pos_erasure = compileFile(posDir, "erasure")
@Test def pos_Coder() = compileFile(posDir, "Coder")
Expand Down Expand Up @@ -65,7 +69,8 @@ class tests extends CompilerTest {
@Test def pos_subtyping = compileFile(posDir, "subtyping")
@Test def pos_t2613 = compileFile(posSpecialDir, "t2613")(allowDeepSubtypes)

@Test def pos_all = compileFiles(posDir, twice)
@Test def pos_all = compileFiles(posDir, failedOther)

@Test def new_all = compileFiles(newDir, twice)

@Test def neg_blockescapes() = compileFile(negDir, "blockescapesNeg", xerrors = 1)
Expand Down Expand Up @@ -115,19 +120,24 @@ class tests extends CompilerTest {
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
@Test def neg_i0281 = compileFile(negDir, "i0281-null-primitive-conforms", xerrors = 3)

@Test def dotc = compileDir(dotcDir + "tools/dotc", twice)(allowDeepSubtypes)
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", twice)
@Test def dotc_config = compileDir(dotcDir + "tools/dotc/config", twice)
@Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", twice)(allowDeepSubtypes)
@Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling", twice)(allowDeepSubtypes)
@Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform", twice)(allowDeepSubtypes)
@Test def dotc = compileDir(dotcDir + "tools/dotc", failedOther)(allowDeepSubtypes)
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", failedOther) // similar to dotc_config
@Test def dotc_config = compileDir(dotcDir + "tools/dotc/config", failedOther) // seems to mess up stack frames
@Test def dotc_core = compileDir(dotcDir + "tools/dotc/core", failedUnderscore)(allowDeepSubtypes)
// fails due to This refference to a non-eclosing class. Need to check

@Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling", failedOther)(allowDeepSubtypes) // Cannot emit primitive conversion from V to Z

@Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/parsing", twice)
@Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform", failedbyName)(allowDeepSubtypes)

@Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/parsing", failedOther)
// Expected primitive types I - Ljava/lang/Object
// Tried to return an object where expected type was Integer
@Test def dotc_printing = compileDir(dotcDir + "tools/dotc/printing", twice)
@Test def dotc_reporting = compileDir(dotcDir + "tools/dotc/reporting", twice)
@Test def dotc_typer = compileDir(dotcDir + "tools/dotc/typer", twice)
@Test def dotc_util = compileDir(dotcDir + "tools/dotc/util", twice)
@Test def tools_io = compileDir(dotcDir + "tools/io", twice)
@Test def dotc_typer = compileDir(dotcDir + "tools/dotc/typer", failedOther) // similar to dotc_config
//@Test def dotc_util = compileDir(dotcDir + "tools/dotc/util") //fails inside ExtensionMethods with ClassCastException
@Test def tools_io = compileDir(dotcDir + "tools/io", failedOther) // similar to dotc_config

@Test def helloWorld = compileFile(posDir, "HelloWorld", doEmitBytecode)
@Test def labels = compileFile(posDir, "Labels", doEmitBytecode)
Expand All @@ -137,7 +147,7 @@ class tests extends CompilerTest {
dotcDir + "tools/dotc/CompilationUnit.scala",
dotcDir + "tools/dotc/core/Types.scala",
dotcDir + "tools/dotc/ast/Trees.scala",
//"-Ylog:frontend",
failedUnderscore.head,
"-Xprompt",
"#runs", "2"))

Expand Down

0 comments on commit 4c11203

Please sign in to comment.