mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
Remove directives that have no effect from bytecode text tests
All bytecode text tests are run with stdlib in the classpath and only for JVM backend, therefore directives WITH_RUNTIME, TARGET_BACKEND, IGNORE_BACKEND are not needed
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val arr = arrayOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,4 +17,4 @@ fun box(): String {
|
||||
// 0 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val arr = arrayOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,4 +17,4 @@ fun box(): String {
|
||||
// 0 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val arr = intArrayOf()
|
||||
|
||||
fun box(): String {
|
||||
@@ -16,4 +14,4 @@ fun box(): String {
|
||||
// 0 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val arr = intArrayOf(10, 20, 30, 40)
|
||||
|
||||
fun box(): String {
|
||||
@@ -17,4 +15,4 @@ fun box(): String {
|
||||
// 0 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val arr = arrayOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,4 +17,4 @@ fun box(): String {
|
||||
// 0 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 ARRAYLENGTH
|
||||
// 1 ARRAYLENGTH
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
var s = ""
|
||||
for (c in "testString") {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val cs: CharSequence = "abcd"
|
||||
|
||||
fun box(): String {
|
||||
@@ -20,4 +18,4 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 length
|
||||
// 1 charAt
|
||||
// 1 charAt
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
for ((index, x) in "".withIndex()) {
|
||||
return "Loop over empty String should not be executed"
|
||||
@@ -14,4 +12,4 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 length
|
||||
// 1 charAt
|
||||
// 1 charAt
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val s = StringBuilder()
|
||||
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 length
|
||||
// 1 charAt
|
||||
// 1 charAt
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = "abcd"
|
||||
|
||||
fun box(): String {
|
||||
@@ -20,4 +18,4 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 length
|
||||
// 0 charAt
|
||||
// 0 charAt
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = "abcd"
|
||||
|
||||
fun box(): String {
|
||||
@@ -20,4 +18,4 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 length
|
||||
// 1 charAt
|
||||
// 1 charAt
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = "abcd"
|
||||
|
||||
fun useAny(x: Any) {}
|
||||
@@ -23,4 +21,4 @@ fun box(): String {
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 1 length
|
||||
// 1 charAt
|
||||
// 1 charAt
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test(s: CharSequence): Int {
|
||||
var result = 0
|
||||
for (i in s.indices) {
|
||||
@@ -16,4 +14,4 @@ fun test(s: CharSequence): Int {
|
||||
|
||||
// 0 IF_ICMPGT
|
||||
// 0 IF_ICMPEQ
|
||||
// 1 IF_ICMPGE
|
||||
// 1 IF_ICMPGE
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun Collection<Int>.sumIndices(): Int {
|
||||
var sum = 0
|
||||
for (i in indices) {
|
||||
@@ -16,4 +14,4 @@ fun Collection<Int>.sumIndices(): Int {
|
||||
|
||||
// 0 IF_ICMPGT
|
||||
// 0 IF_ICMPEQ
|
||||
// 1 IF_ICMPGE
|
||||
// 1 IF_ICMPGE
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
var sum = 0
|
||||
for (i in listOf(0, 0, 0, 0).indices) {
|
||||
@@ -15,4 +13,4 @@ fun test() {
|
||||
|
||||
// 0 IF_ICMPGT
|
||||
// 0 IF_ICMPEQ
|
||||
// 1 IF_ICMPGE
|
||||
// 1 IF_ICMPGE
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun test(coll: Collection<*>?): Int {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
var sum = 0
|
||||
for (i in arrayOf("", "", "", "").indices) {
|
||||
@@ -15,4 +13,4 @@ fun test() {
|
||||
|
||||
// 0 IF_ICMPGT
|
||||
// 0 IF_ICMPEQ
|
||||
// 1 IF_ICMPGE
|
||||
// 1 IF_ICMPGE
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
var sum = 0
|
||||
for (i in intArrayOf(0, 0, 0, 0).indices) {
|
||||
@@ -15,4 +13,4 @@ fun test() {
|
||||
|
||||
// 0 IF_ICMPGT
|
||||
// 0 IF_ICMPEQ
|
||||
// 1 IF_ICMPGE
|
||||
// 1 IF_ICMPGE
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf<Any>()
|
||||
|
||||
fun box(): String {
|
||||
@@ -15,4 +13,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d")
|
||||
|
||||
fun useAny(x: Any) {}
|
||||
@@ -21,4 +19,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun intRange() = 1 .. 4
|
||||
@@ -27,4 +26,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -12,4 +11,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -12,4 +11,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -12,4 +11,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -23,4 +22,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
for (i in (4 .. 1).reversed()) {
|
||||
throw AssertionError("Loop should not be executed")
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 0 getEnd
|
||||
// 0 getFirst
|
||||
// 0 getLast
|
||||
// 0 getStep
|
||||
// 0 getStep
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun intRange() = 1 .. 4
|
||||
@@ -27,4 +26,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -32,4 +31,4 @@ fun box(): String {
|
||||
// 0 IFEQ
|
||||
// 0 IF_ICMPEQ
|
||||
// 2 IF_ICMPLT
|
||||
// 1 LCMP
|
||||
// 1 LCMP
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun intRange() = 1 .. 4
|
||||
@@ -27,4 +26,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -20,4 +19,4 @@ fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// 0 reversed
|
||||
// 0 reversed
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf<Any>().asSequence()
|
||||
|
||||
fun box(): String {
|
||||
@@ -15,4 +13,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +16,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// FULL_JDK
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xsl = arrayListOf("a", "b", "c", "d")
|
||||
val xs = xsl.asSequence()
|
||||
@@ -29,4 +27,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||
|
||||
fun useAny(x: Any) {}
|
||||
@@ -21,4 +19,4 @@ fun box(): String {
|
||||
// 1 hasNext
|
||||
// 1 next
|
||||
// 0 component1
|
||||
// 0 component2
|
||||
// 0 component2
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test() {
|
||||
var s = ""
|
||||
for (c in "testString") {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test(): Int {
|
||||
var sum = 0
|
||||
for (i in 1 until 6) {
|
||||
@@ -13,4 +11,4 @@ fun test(): Int {
|
||||
// 0 getEnd
|
||||
// 0 getFirst
|
||||
// 0 getLast
|
||||
// 1 IF
|
||||
// 1 IF
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test(): Int {
|
||||
var sum = 0
|
||||
for (i in 4 downTo 1) {
|
||||
@@ -14,4 +12,4 @@ fun test(): Int {
|
||||
// 0 getFirst
|
||||
// 0 getLast
|
||||
// 0 IF_ICMPEQ
|
||||
// 1 IF_ICMPLT
|
||||
// 1 IF_ICMPLT
|
||||
|
||||
Reference in New Issue
Block a user