summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-08-01 02:09:09 -0700
committerSom Snytt <som.snytt@gmail.com>2013-08-01 02:09:09 -0700
commit8f5a892512ba848a52a4ddd5d79e9c79d12ccfc1 (patch)
tree60fcf213b77b7a8b7887b3f3ff09fd276f09cd3b /test/files/run
parent46616ea2e94fa6ac7100b1cde66295f68338e18e (diff)
downloadscala-8f5a892512ba848a52a4ddd5d79e9c79d12ccfc1.tar.gz
scala-8f5a892512ba848a52a4ddd5d79e9c79d12ccfc1.tar.bz2
scala-8f5a892512ba848a52a4ddd5d79e9c79d12ccfc1.zip
SI-7265 javaSpecVersion, adjust isJava... tests
Make this and related properties public, because they are useful. This change ought to have been committed at 2.11 and then backported with restrictions, rather than vice-versa. Note that they are defined in the order, version, vendor and name, which is the order from the underlying javadoc. It would be a neat feature of the PR validator, as previously imagined, to run a "pending" test and then, on success and merge, to move it automatically to the canonical suite.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t7265.scala27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/files/run/t7265.scala b/test/files/run/t7265.scala
deleted file mode 100644
index c556930303..0000000000
--- a/test/files/run/t7265.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-
-import scala.util.Properties._
-
-object Test extends App {
-
- setProp("java.specification.version", "1.7")
-
- assert( isJavaAtLeast("1.5"))
- assert( isJavaAtLeast("1.6"))
- assert( isJavaAtLeast("1.7"))
- assert(!isJavaAtLeast("1.8"))
- assert(!isJavaAtLeast("1.71"))
-
- failing(isJavaAtLeast("1.a"))
- failing(isJavaAtLeast("1"))
- failing(isJavaAtLeast(""))
- failing(isJavaAtLeast("."))
- failing(isJavaAtLeast(".5"))
- failing(isJavaAtLeast("1.7.1"))
-
- def failing(u: =>Unit) = try {
- u
- assert(false, "Expected Exception")
- } catch {
- case _: NumberFormatException =>
- }
-}