diff options
Diffstat (limited to 'src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala')
-rw-r--r-- | src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala b/src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala index 5eb1f32..e728242 100644 --- a/src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala +++ b/src/test/scala/scala/async/run/uncheckedBounds/UncheckedBoundsSpec.scala @@ -7,8 +7,7 @@ import scala.async.TreeInterrogation class UncheckedBoundsSpec { @Test def insufficientLub_SI_7694() { - suppressingFailureBefore2_10_3 { - eval( s""" + eval( s""" object Test { import _root_.scala.async.run.toughtype._ import _root_.scala.async.internal.AsyncId.{async, await} @@ -17,12 +16,10 @@ class UncheckedBoundsSpec { } } """, compileOptions = s"-cp ${toolboxClasspath} ") - } } @Test def insufficientLub_SI_7694_ScalaConcurrent() { - suppressingFailureBefore2_10_3 { - eval( s""" + eval( s""" object Test { import _root_.scala.async.run.toughtype._ import _root_.scala.async.Async.{async, await} @@ -33,25 +30,6 @@ class UncheckedBoundsSpec { } } """, compileOptions = s"-cp ${toolboxClasspath} ") - } } - private def suppressingFailureBefore2_10_3(body: => Any) { - try { - body - } catch { - case x: Throwable => - // @uncheckedBounds was only introduced in 2.10.3/ 2.11.0-M5, so avoid reporting this test failure in those cases. - scala.util.Properties.versionNumberString match { - case "2.10.0" | "2.10.1" | "2.10.2" | "2.11.0-M4" => // ignore, the @uncheckedBounds doesn't exist yet - case _ => - val annotationExists = - reflect.runtime.currentMirror.staticClass("scala.reflect.internal.annotations.uncheckedBounds") == reflect.runtime.universe.NoSymbol - if (annotationExists) - Assert.fail("@uncheckedBounds not found in scala-reflect.jar") - else - Assert.fail(s"@uncheckedBounds exists, but it didn't prevent this failure: $x") - } - } - } } |