diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-05-22 12:02:09 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2014-05-22 12:02:09 -0700 |
commit | 85af6f0f7dc74e67149e8d8fc392c3cc97134cca (patch) | |
tree | d3e441a17f0c84f748695174268f3d4921104bf2 /test/files/run/t5905-features.scala | |
parent | 6c99037952766c7075b48171fe65a6077cf6b9f5 (diff) | |
download | scala-85af6f0f7dc74e67149e8d8fc392c3cc97134cca.tar.gz scala-85af6f0f7dc74e67149e8d8fc392c3cc97134cca.tar.bz2 scala-85af6f0f7dc74e67149e8d8fc392c3cc97134cca.zip |
SI-5905 Clarify test case
The language feature options are discovered reflectively, but it
is nice to enforce that expected options are supplied.
Short of that, the code string includes a rowdy postfix operator.
It still does enforce that at least one option was discovered.
Diffstat (limited to 'test/files/run/t5905-features.scala')
-rw-r--r-- | test/files/run/t5905-features.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/files/run/t5905-features.scala b/test/files/run/t5905-features.scala index a3848eef2a..b518d61145 100644 --- a/test/files/run/t5905-features.scala +++ b/test/files/run/t5905-features.scala @@ -3,13 +3,13 @@ import tools.partest.DirectTest // verify that all languageFeature names are accepted by -language object Test extends DirectTest { - override def code = "class Code { def f = (1 to 10) size }" // exercise a feature + override def code = "class Code { def f = (1 to 10) size }" // exercise a feature to sanity-check coverage of -language options override def extraSettings = s"-usejavacp -d ${testOutput.path}" override def show() = { - val global = newCompiler("-language:postfixOps", "-Ystop-after:typer") - compileString(global)(code) + val global = newCompiler("-Ystop-after:typer") + compileString(global)("") // warm me up, scotty import global._ exitingTyper { //def isFeature(s: Symbol) = s.annotations.exists((a: AnnotationInfo) => a.tpe <:< typeOf[scala.annotation.meta.languageFeature]) @@ -21,6 +21,8 @@ object Test extends DirectTest { assert(feats.nonEmpty, "Test must find feature flags.") + //compile("junk") // tragically, does not fail the test, i.e., arg must not be totally borked + //dynamics,postfixOps,reflectiveCalls,implicitConversions,higherKinds,existentials,experimental.macros compile(s"-language:$all") } |