diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-08-25 23:13:05 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-09-10 00:05:03 +0200 |
commit | 44b5c261a8e585c5747380895aa06c84f9d63f6c (patch) | |
tree | bebacf259c0d62d4b9298b4892cc5c2c309cc857 /test/files | |
parent | d3cfbb1db68dab3308edfa66bbdb497c5d3f0cb2 (diff) | |
download | scala-44b5c261a8e585c5747380895aa06c84f9d63f6c.tar.gz scala-44b5c261a8e585c5747380895aa06c84f9d63f6c.tar.bz2 scala-44b5c261a8e585c5747380895aa06c84f9d63f6c.zip |
JUnit tests for dead code elimination.
JUnit tests may use tools from partest-extras (ASMConverters)
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/jvm/t6941/test.scala | 4 | ||||
-rw-r--r-- | test/files/jvm/t7253/test.scala | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/files/jvm/t6941/test.scala b/test/files/jvm/t6941/test.scala index 248617f71f..fceb54487f 100644 --- a/test/files/jvm/t6941/test.scala +++ b/test/files/jvm/t6941/test.scala @@ -1,4 +1,4 @@ -import scala.tools.partest.BytecodeTest +import scala.tools.partest.{BytecodeTest, ASMConverters} import scala.tools.nsc.util.JavaClassPath import java.io.InputStream @@ -10,6 +10,6 @@ import scala.collection.JavaConverters._ object Test extends BytecodeTest { def show: Unit = { val classNode = loadClassNode("SameBytecode") - similarBytecode(getMethod(classNode, "a"), getMethod(classNode, "b"), equalsModuloVar) + similarBytecode(getMethod(classNode, "a"), getMethod(classNode, "b"), ASMConverters.equivalentBytecode(_, _)) } } diff --git a/test/files/jvm/t7253/test.scala b/test/files/jvm/t7253/test.scala index 7fe08e8813..a3f1e86e65 100644 --- a/test/files/jvm/t7253/test.scala +++ b/test/files/jvm/t7253/test.scala @@ -1,4 +1,4 @@ -import scala.tools.partest.BytecodeTest +import scala.tools.partest.{BytecodeTest, ASMConverters} import scala.tools.nsc.util.JavaClassPath import java.io.InputStream @@ -8,10 +8,10 @@ import asm.tree.{ClassNode, InsnList} import scala.collection.JavaConverters._ object Test extends BytecodeTest { - import instructions._ + import ASMConverters._ def show: Unit = { - val instrBaseSeqs = Seq("ScalaClient_1", "JavaClient_1") map (name => instructions.fromMethod(getMethod(loadClassNode(name), "foo"))) + val instrBaseSeqs = Seq("ScalaClient_1", "JavaClient_1") map (name => instructionsFromMethod(getMethod(loadClassNode(name), "foo"))) val instrSeqs = instrBaseSeqs map (_ filter isInvoke) cmpInstructions(instrSeqs(0), instrSeqs(1)) } |