diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-05-07 08:11:14 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2014-05-08 15:55:44 -0700 |
commit | 78bd175afcc89878ca1c00cce69d0517909c6ff3 (patch) | |
tree | e5bd888f065eefec96b9816c94c98517d4a1c2a1 /test | |
parent | 534cadc762a5dc3a5d211ad3733df91c7b1bd931 (diff) | |
download | scala-78bd175afcc89878ca1c00cce69d0517909c6ff3.tar.gz scala-78bd175afcc89878ca1c00cce69d0517909c6ff3.tar.bz2 scala-78bd175afcc89878ca1c00cce69d0517909c6ff3.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.
Delete -nowarn flags file. Let's see if that was to suppress
a warning in the standard build.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5905-features.flags | 1 | ||||
-rw-r--r-- | test/files/run/t5905-features.scala | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/test/files/run/t5905-features.flags b/test/files/run/t5905-features.flags deleted file mode 100644 index ad51758c39..0000000000 --- a/test/files/run/t5905-features.flags +++ /dev/null @@ -1 +0,0 @@ --nowarn diff --git a/test/files/run/t5905-features.scala b/test/files/run/t5905-features.scala index a3848eef2a..547a521cb5 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 + //dynamics,postfixOps,reflectiveCalls,implicitConversions,higherKinds,existentials,experimental.macros compile(s"-language:$all") } |