diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-07-25 12:58:56 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-08-21 18:02:35 -0700 |
commit | 1683c95e159006d40a8458d29ef266ca741752c7 (patch) | |
tree | 69d40c95510159340ed3e660f0809f1bfef97ed7 /test/files/run/t6955.scala | |
parent | f3731f9ace5d3d5e213ea786fe0027ea66c5358b (diff) | |
download | scala-1683c95e159006d40a8458d29ef266ca741752c7.tar.gz scala-1683c95e159006d40a8458d29ef266ca741752c7.tar.bz2 scala-1683c95e159006d40a8458d29ef266ca741752c7.zip |
SI-7622 Clean Up Phase Assembly
Let optimiser components and continuations plugin opt-out
when required flags are not set.
Wasted time on a whitespace error in check file, so let
--debug dump the processed check file and its diff.
Diffstat (limited to 'test/files/run/t6955.scala')
-rw-r--r-- | test/files/run/t6955.scala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/files/run/t6955.scala b/test/files/run/t6955.scala index 980aa420cc..329af688e4 100644 --- a/test/files/run/t6955.scala +++ b/test/files/run/t6955.scala @@ -1,4 +1,4 @@ -import scala.tools.partest.IcodeTest +import scala.tools.partest.IcodeComparison // this class should compile to code that uses switches (twice) class Switches { @@ -20,9 +20,15 @@ class Switches { } } -object Test extends IcodeTest { +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() = println(collectIcode("").filter(x => x.indexOf("SWITCH ...") >= 0 && x.indexOf("CONSTANT(") == -1).size) + override def show() = { + val expected = 2 + val actual = (collectIcode() filter { + x => x.indexOf("SWITCH ...") >= 0 && x.indexOf("CONSTANT(") == -1 + }).size + assert(actual == expected) + } } |