@@ -30,43 +30,42 @@ class CompilationTests {
30
30
@ Test def pos : Unit = {
31
31
implicit val testGroup : TestGroup = TestGroup (" compilePos" )
32
32
aggregateTests(
33
- // compileFile("tests/pos/nullarify.scala", defaultOptions.and("-Ycheck:nullarify")),
34
- // compileFile("tests/pos-special/utf8encoded.scala", explicitUTF8),
35
- // compileFile("tests/pos-special/utf16encoded.scala", explicitUTF16),
36
- // compileFilesInDir("tests/pos-special/sourcepath/outer", defaultOptions.and("-sourcepath", "tests/pos-special/sourcepath")),
37
- // compileFile("tests/pos-special/sourcepath/outer/nested/Test4.scala", defaultOptions.and("-sourcepath", "tests/pos-special/sourcepath")),
38
- // compileFilesInDir("tests/pos-special/fatal-warnings", defaultOptions.and("-Xfatal-warnings", "-deprecation", "-feature")),
39
- // compileFilesInDir("tests/pos-special/spec-t5545", defaultOptions),
40
- // compileFilesInDir("tests/pos-special/strawman-collections", allowDeepSubtypes),
41
- // compileFilesInDir("tests/pos-special/isInstanceOf", allowDeepSubtypes.and("-Xfatal-warnings")),
42
- // compileFilesInDir("tests/new", defaultOptions.and("-source", "3.2")), // just to see whether 3.2 works
43
- // compileFilesInDir("tests/pos-scala2", scala2CompatMode),
44
- // compileFilesInDir("tests/pos-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")),
45
- // compileFilesInDir("tests/pos-custom-args/erased", defaultOptions.and("-language:experimental.erasedDefinitions")),
46
- // compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init")),
47
- // // Run tests for legacy lazy vals
48
- // compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.posLazyValsAllowlist)),
49
- // compileFilesInDir("tests/pos-deep-subtype", allowDeepSubtypes),
50
- // compileFilesInDir("tests/pos-custom-args/no-experimental", defaultOptions.and("-Yno-experimental")),
51
- // compileFilesInDir("tests/pos-custom-args/strict", defaultOptions.and("-source", "future", "-deprecation", "-Xfatal-warnings")),
52
- // compileDir("tests/pos-special/java-param-names", defaultOptions.withJavacOnlyOptions("-parameters")),
53
- // compileFile(
54
- // // succeeds despite -Xfatal-warnings because of -nowarn
55
- // "tests/neg-custom-args/fatal-warnings/xfatalWarnings.scala",
56
- // defaultOptions.and("-nowarn", "-Xfatal-warnings")
57
- // ),
58
- // compileFile("tests/pos-special/typeclass-scaling.scala", defaultOptions.and("-Xmax-inlines", "40")),
59
- // compileFile("tests/pos-special/i7575.scala", defaultOptions.andLanguageFeature("dynamics")),
60
- // compileFile("tests/pos-special/kind-projector.scala", defaultOptions.and("-Ykind-projector")),
61
- // compileFile("tests/pos-special/kind-projector-underscores.scala", defaultOptions.and("-Ykind-projector:underscores")),
62
- // compileFile("tests/run/i5606.scala", defaultOptions.and("-Yretain-trees")),
63
- // compileFile("tests/pos-custom-args/i8875.scala", defaultOptions.and("-Xprint:getters")),
64
- // compileFile("tests/pos-custom-args/i9267.scala", defaultOptions.and("-Ystop-after:erasure")),
65
- // compileFile("tests/pos-special/extend-java-enum.scala", defaultOptions.and("-source", "3.0-migration")),
66
- // compileFile("tests/pos-custom-args/help.scala", defaultOptions.and("-help", "-V", "-W", "-X", "-Y")),
67
- // compileFile("tests/pos-custom-args/i13044.scala", defaultOptions.and("-Xmax-inlines:33")),
68
- // compileFile("tests/pos-custom-args/jdk-8-app.scala", defaultOptions.and("-release:8")),
69
- compileFile(" tests/pos-custom-args/i11022.scala" , defaultOptions.and(" -Xfatal-warnings" , " -deprecation" )),
33
+ compileFile(" tests/pos/nullarify.scala" , defaultOptions.and(" -Ycheck:nullarify" )),
34
+ compileFile(" tests/pos-special/utf8encoded.scala" , explicitUTF8),
35
+ compileFile(" tests/pos-special/utf16encoded.scala" , explicitUTF16),
36
+ compileFilesInDir(" tests/pos-special/sourcepath/outer" , defaultOptions.and(" -sourcepath" , " tests/pos-special/sourcepath" )),
37
+ compileFile(" tests/pos-special/sourcepath/outer/nested/Test4.scala" , defaultOptions.and(" -sourcepath" , " tests/pos-special/sourcepath" )),
38
+ compileFilesInDir(" tests/pos-special/fatal-warnings" , defaultOptions.and(" -Xfatal-warnings" , " -deprecation" , " -feature" )),
39
+ compileFilesInDir(" tests/pos-special/spec-t5545" , defaultOptions),
40
+ compileFilesInDir(" tests/pos-special/strawman-collections" , allowDeepSubtypes),
41
+ compileFilesInDir(" tests/pos-special/isInstanceOf" , allowDeepSubtypes.and(" -Xfatal-warnings" )),
42
+ compileFilesInDir(" tests/new" , defaultOptions.and(" -source" , " 3.2" )), // just to see whether 3.2 works
43
+ compileFilesInDir(" tests/pos-scala2" , scala2CompatMode),
44
+ compileFilesInDir(" tests/pos-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
45
+ compileFilesInDir(" tests/pos-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
46
+ compileFilesInDir(" tests/pos" , defaultOptions.and(" -Ysafe-init" )),
47
+ // Run tests for legacy lazy vals
48
+ compileFilesInDir(" tests/pos" , defaultOptions.and(" -Ysafe-init" , " -Ylegacy-lazy-vals" , " -Ycheck-constraint-deps" ), FileFilter .include(TestSources .posLazyValsAllowlist)),
49
+ compileFilesInDir(" tests/pos-deep-subtype" , allowDeepSubtypes),
50
+ compileFilesInDir(" tests/pos-custom-args/no-experimental" , defaultOptions.and(" -Yno-experimental" )),
51
+ compileFilesInDir(" tests/pos-custom-args/strict" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
52
+ compileDir(" tests/pos-special/java-param-names" , defaultOptions.withJavacOnlyOptions(" -parameters" )),
53
+ compileFile(
54
+ // succeeds despite -Xfatal-warnings because of -nowarn
55
+ " tests/neg-custom-args/fatal-warnings/xfatalWarnings.scala" ,
56
+ defaultOptions.and(" -nowarn" , " -Xfatal-warnings" )
57
+ ),
58
+ compileFile(" tests/pos-special/typeclass-scaling.scala" , defaultOptions.and(" -Xmax-inlines" , " 40" )),
59
+ compileFile(" tests/pos-special/i7575.scala" , defaultOptions.andLanguageFeature(" dynamics" )),
60
+ compileFile(" tests/pos-special/kind-projector.scala" , defaultOptions.and(" -Ykind-projector" )),
61
+ compileFile(" tests/pos-special/kind-projector-underscores.scala" , defaultOptions.and(" -Ykind-projector:underscores" )),
62
+ compileFile(" tests/run/i5606.scala" , defaultOptions.and(" -Yretain-trees" )),
63
+ compileFile(" tests/pos-custom-args/i8875.scala" , defaultOptions.and(" -Xprint:getters" )),
64
+ compileFile(" tests/pos-custom-args/i9267.scala" , defaultOptions.and(" -Ystop-after:erasure" )),
65
+ compileFile(" tests/pos-special/extend-java-enum.scala" , defaultOptions.and(" -source" , " 3.0-migration" )),
66
+ compileFile(" tests/pos-custom-args/help.scala" , defaultOptions.and(" -help" , " -V" , " -W" , " -X" , " -Y" )),
67
+ compileFile(" tests/pos-custom-args/i13044.scala" , defaultOptions.and(" -Xmax-inlines:33" )),
68
+ compileFile(" tests/pos-custom-args/jdk-8-app.scala" , defaultOptions.and(" -release:8" )),
70
69
).checkCompile()
71
70
}
72
71
0 commit comments