summaryrefslogtreecommitdiff
path: root/test/disabled/neg
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-10-21 13:39:35 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-10-21 13:39:35 +0200
commit88be7ea7efe65c4856a7f3d884db31269890f260 (patch)
treec11f1890edcdef4f49fcfada14ae01c7beb3ddf2 /test/disabled/neg
parent98cee68a7026a3ca819cfecacc0c59c943000943 (diff)
downloadscala-88be7ea7efe65c4856a7f3d884db31269890f260.tar.gz
scala-88be7ea7efe65c4856a7f3d884db31269890f260.tar.bz2
scala-88be7ea7efe65c4856a7f3d884db31269890f260.zip
Moving disabled tests to their rightful home.
test/disabled, not test/files/disabled.
Diffstat (limited to 'test/disabled/neg')
-rw-r--r--test/disabled/neg/t7020.check19
-rw-r--r--test/disabled/neg/t7020.flags1
-rw-r--r--test/disabled/neg/t7020.scala30
3 files changed, 50 insertions, 0 deletions
diff --git a/test/disabled/neg/t7020.check b/test/disabled/neg/t7020.check
new file mode 100644
index 0000000000..f9600ca7fc
--- /dev/null
+++ b/test/disabled/neg/t7020.check
@@ -0,0 +1,19 @@
+t7020.scala:3: warning: match may not be exhaustive.
+It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
+ List(5) match {
+ ^
+t7020.scala:10: warning: match may not be exhaustive.
+It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
+ List(5) match {
+ ^
+t7020.scala:17: warning: match may not be exhaustive.
+It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
+ List(5) match {
+ ^
+t7020.scala:24: warning: match may not be exhaustive.
+It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
+ List(5) match {
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found
diff --git a/test/disabled/neg/t7020.flags b/test/disabled/neg/t7020.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/disabled/neg/t7020.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/disabled/neg/t7020.scala b/test/disabled/neg/t7020.scala
new file mode 100644
index 0000000000..cc5421bab1
--- /dev/null
+++ b/test/disabled/neg/t7020.scala
@@ -0,0 +1,30 @@
+object Test {
+ // warning was non-deterministic
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+}