summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-11-06 17:12:26 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2016-01-25 10:36:12 +0100
commite49fda4fab463da13e084d1deeb6f1a58e0041d1 (patch)
treec08c32bd384b7d791404a52c2b020f58e4e9f1c5 /test/pending
parenta8d97403928983f72db66c6dab1354e7c89fe343 (diff)
downloadscala-e49fda4fab463da13e084d1deeb6f1a58e0041d1.tar.gz
scala-e49fda4fab463da13e084d1deeb6f1a58e0041d1.tar.bz2
scala-e49fda4fab463da13e084d1deeb6f1a58e0041d1.zip
Rewrite test for SI-6955
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/run/t6955.scala33
1 files changed, 0 insertions, 33 deletions
diff --git a/test/pending/run/t6955.scala b/test/pending/run/t6955.scala
deleted file mode 100644
index 787617eff1..0000000000
--- a/test/pending/run/t6955.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-import scala.tools.partest.IcodeComparison
-
-// this class should compile to code that uses switches (twice)
-class Switches {
- type Tag = Byte
-
- def switchBad(i: Tag): Int = i match { // notice type of i is Tag = Byte
- case 1 => 1
- case 2 => 2
- case 3 => 3
- case _ => 0
- }
-
- // this worked before, should keep working
- def switchOkay(i: Byte): Int = i match {
- case 1 => 1
- case 2 => 2
- case 3 => 3
- case _ => 0
- }
-}
-
-object Test extends IcodeComparison {
- // ensure we get two switches out of this -- ignore the rest of the output for robustness
- // exclude the constant we emit for the "SWITCH ..." string below (we get the icode for all the code you see in this file)
- override def show() = {
- val expected = 2
- val actual = (collectIcode() filter {
- x => x.indexOf("SWITCH ...") >= 0 && x.indexOf("CONSTANT(") == -1
- }).size
- assert(actual == expected, s"switches expected: $expected, actual: $actual")
- }
-}