Skip to content

Commit fdc3812

Browse files
committed
Merge pull request scala#3777 from som-snytt/issue/5905-test
SI-5905 Clarify test case
2 parents ddb29a8 + 85af6f0 commit fdc3812

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/files/run/t5905-features.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import tools.partest.DirectTest
33

44
// verify that all languageFeature names are accepted by -language
55
object Test extends DirectTest {
6-
override def code = "class Code { def f = (1 to 10) size }" // exercise a feature
6+
override def code = "class Code { def f = (1 to 10) size }" // exercise a feature to sanity-check coverage of -language options
77

88
override def extraSettings = s"-usejavacp -d ${testOutput.path}"
99

1010
override def show() = {
11-
val global = newCompiler("-language:postfixOps", "-Ystop-after:typer")
12-
compileString(global)(code)
11+
val global = newCompiler("-Ystop-after:typer")
12+
compileString(global)("") // warm me up, scotty
1313
import global._
1414
exitingTyper {
1515
//def isFeature(s: Symbol) = s.annotations.exists((a: AnnotationInfo) => a.tpe <:< typeOf[scala.annotation.meta.languageFeature])
@@ -21,6 +21,8 @@ object Test extends DirectTest {
2121

2222
assert(feats.nonEmpty, "Test must find feature flags.")
2323

24+
//compile("junk") // tragically, does not fail the test, i.e., arg must not be totally borked
25+
2426
//dynamics,postfixOps,reflectiveCalls,implicitConversions,higherKinds,existentials,experimental.macros
2527
compile(s"-language:$all")
2628
}

0 commit comments

Comments
 (0)