Add test on bytecode text

Test data should be a Kotlin source file with zero or more comments e.g. of
the form: '// 1 INVOKEVIRTUAL'. The test then checks that the generated
bytecode for this file contains exactly one occurrence of the string
'INVOKEVIRTUAL'
This commit is contained in:
Alexander Udalov
2013-02-09 21:44:33 +04:00
parent fe96a0172d
commit 620143ae5b
23 changed files with 259 additions and 169 deletions
@@ -0,0 +1,16 @@
// Check that this code doesn't contains INVOKEVIRTUAL instruction
class B {
private fun foo(i: Int = 1) {
}
fun f() {
foo(2)
}
}
fun box(): String {
return "OK"
}
// 0 INVOKEVIRTUAL
// 3 INVOKESPECIAL