From 78bd175afcc89878ca1c00cce69d0517909c6ff3 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 7 May 2014 08:11:14 -0700 Subject: 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. --- test/files/run/t5905-features.flags | 1 - test/files/run/t5905-features.scala | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 test/files/run/t5905-features.flags (limited to 'test/files/run') 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") } -- cgit v1.2.3