summaryrefslogtreecommitdiff
path: root/test/files/jvm/t7006
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/jvm/t7006')
-rw-r--r--test/files/jvm/t7006/Foo_1.flags1
-rw-r--r--test/files/jvm/t7006/Foo_1.scala10
-rw-r--r--test/files/jvm/t7006/Test.scala19
3 files changed, 0 insertions, 30 deletions
diff --git a/test/files/jvm/t7006/Foo_1.flags b/test/files/jvm/t7006/Foo_1.flags
deleted file mode 100644
index 29a9d424f0..0000000000
--- a/test/files/jvm/t7006/Foo_1.flags
+++ /dev/null
@@ -1 +0,0 @@
--optimise -Ydebug -Xfatal-warnings -Ybackend:GenASM
diff --git a/test/files/jvm/t7006/Foo_1.scala b/test/files/jvm/t7006/Foo_1.scala
deleted file mode 100644
index 3985557d9f..0000000000
--- a/test/files/jvm/t7006/Foo_1.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-class Foo_1 {
- def foo {
- try {
- val x = 3 // this will be optimized away, leaving a useless jump only block
- } finally {
- print("hello")
- }
- while(true){} // ensure infinite loop doesn't break the algorithm
- }
-}
diff --git a/test/files/jvm/t7006/Test.scala b/test/files/jvm/t7006/Test.scala
deleted file mode 100644
index 065a23510e..0000000000
--- a/test/files/jvm/t7006/Test.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-import scala.tools.partest.BytecodeTest
-import scala.tools.asm
-import asm.tree.InsnList
-import scala.collection.JavaConverters._
-
-object Test extends BytecodeTest {
- def show: Unit = {
- val classNode = loadClassNode("Foo_1")
- val methodNode = getMethod(classNode, "foo")
- assert(count(methodNode.instructions, asm.Opcodes.NOP) == 0)
- assert(count(methodNode.instructions, asm.Opcodes.GOTO) == 1)
- }
-
- def count(insnList: InsnList, opcode: Int): Int = {
- def isNop(node: asm.tree.AbstractInsnNode): Boolean =
- (node.getOpcode == opcode)
- insnList.iterator.asScala.count(isNop)
- }
-}