diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-09-12 10:26:46 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-09-12 10:26:46 -0700 |
commit | 33a819f61b8b9c19708e8ae22bf25adf6cc7ac24 (patch) | |
tree | 30fb8d7295f359aca662eb3fb96bc9f9a0646f1f /test/files/run/t6956.scala | |
parent | e748f2ed8fda553fd8fe36499bac63aa115a82a9 (diff) | |
parent | dfe3fe335bf7358e04e7f422fecf16f445c14f2b (diff) | |
download | scala-33a819f61b8b9c19708e8ae22bf25adf6cc7ac24.tar.gz scala-33a819f61b8b9c19708e8ae22bf25adf6cc7ac24.tar.bz2 scala-33a819f61b8b9c19708e8ae22bf25adf6cc7ac24.zip |
Merge pull request #2859 from som-snytt/issue/7622-phaser
SI-7622 Clean Up Phase Assembly
Diffstat (limited to 'test/files/run/t6956.scala')
-rw-r--r-- | test/files/run/t6956.scala | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/files/run/t6956.scala b/test/files/run/t6956.scala index 4a6583ca45..3569adf483 100644 --- a/test/files/run/t6956.scala +++ b/test/files/run/t6956.scala @@ -1,4 +1,4 @@ -import scala.tools.partest.IcodeTest +import scala.tools.partest.IcodeComparison class Switches { private[this] final val ONE = 1 @@ -18,9 +18,14 @@ 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) + } } - |