Fix interpreter tests after changing offset calculation

This commit is contained in:
Ilya Chernikov
2022-03-14 15:43:37 +01:00
committed by teamcity
parent 738c1f34df
commit 53bc593062
71 changed files with 359 additions and 355 deletions
Binary file not shown.
+2 -2
View File
@@ -17,7 +17,7 @@ fun changeAndReturnSumForObject(array: Array<A>, index: Int, newValue: A): Int {
return sum
}
const val a = arrayOf(1, 2, 3).<!EVALUATED: `3`!>size<!>
const val a = <!EVALUATED: `3`!>arrayOf(1, 2, 3).size<!>
const val b = <!EVALUATED: `15`!>changeAndReturnSum(intArrayOf(1, 2, 3), 0, 10)<!>
const val c = emptyArray<Int>().<!EVALUATED: `0`!>size<!>
const val c = <!EVALUATED: `0`!>emptyArray<Int>().size<!>
const val d = <!EVALUATED: `15`!>changeAndReturnSumForObject(arrayOf(A(1), A(2), A(3)), 0, A(10))<!>
@@ -1,13 +1,13 @@
import kotlin.collections.*
const val doubleArray = arrayOf(
const val doubleArray = <!EVALUATED: `1, 2, 3; 4, 5; 6`!>arrayOf(
arrayOf(1, 2, 3),
arrayOf(4, 5),
arrayOf(6)
).<!EVALUATED: `1, 2, 3; 4, 5; 6`!>joinToString(separator = "; ") { it.joinToString() }<!>
).joinToString(separator = "; ") { it.joinToString() }<!>
const val doubleUintArray = arrayOf(
const val doubleUintArray = <!EVALUATED: `1, 2, 3; 4, 5; 6`!>arrayOf(
arrayOf(1u, 2u, 3u),
arrayOf(4u, 5u),
arrayOf(6u)
).<!EVALUATED: `1, 2, 3; 4, 5; 6`!>joinToString(separator = "; ") { it.joinToString() }<!>
).joinToString(separator = "; ") { it.joinToString() }<!>
+6 -6
View File
@@ -1,16 +1,16 @@
import kotlin.collections.*
const val doubleListSize = listOf(
const val doubleListSize = <!EVALUATED: `3`!>listOf(
listOf("1", "2", "3"),
listOf("4", "5", "6"),
listOf("7", "8", "9")
).<!EVALUATED: `3`!>size<!>
).size<!>
const val doubleListSizeOfList = listOf(
const val doubleListSizeOfList = <!EVALUATED: `3`!>listOf(
listOf("1"),
listOf("4", "5"),
listOf("7", "8", "9")
)[2].<!EVALUATED: `3`!>size<!>
)[2].size<!>
const val doubleListGetSingleElement = <!EVALUATED: `9`!>listOf(
listOf("1"),
@@ -18,8 +18,8 @@ const val doubleListGetSingleElement = <!EVALUATED: `9`!>listOf(
listOf("7", "8", "9")
)[2][2]<!>
const val doubleListElements = listOf(
const val doubleListElements = <!EVALUATED: `1; 4, 5; 7, 8, 9`!>listOf(
listOf("1"),
listOf("4", "5"),
listOf("7", "8", "9")
).<!EVALUATED: `1; 4, 5; 7, 8, 9`!>joinToString(separator = "; ") { it.joinToString() }<!>
).joinToString(separator = "; ") { it.joinToString() }<!>
+3 -3
View File
@@ -1,8 +1,8 @@
import kotlin.collections.*
const val a = listOf(1, 2, 3).<!EVALUATED: `3`!>size<!>
const val b = emptyList<Int>().<!EVALUATED: `0`!>size<!>
const val c = listOf<Int>().<!EVALUATED: `1`!>hashCode()<!>
const val a = <!EVALUATED: `3`!>listOf(1, 2, 3).size<!>
const val b = <!EVALUATED: `0`!>emptyList<Int>().size<!>
const val c = <!EVALUATED: `1`!>listOf<Int>().hashCode()<!>
@CompileTimeCalculation
fun getSum(list: List<Int>): Int {
+12 -12
View File
@@ -1,18 +1,18 @@
import kotlin.*
import kotlin.collections.*
const val a = mapOf(1 to "1", 2 to "2", 3 to "3").<!EVALUATED: `3`!>size<!>
const val b = emptyMap<Any, Any>().<!EVALUATED: `0`!>size<!>
const val a = <!EVALUATED: `3`!>mapOf(1 to "1", 2 to "2", 3 to "3").size<!>
const val b = <!EVALUATED: `0`!>emptyMap<Any, Any>().size<!>
const val contains1 = mapOf(1 to "1", 2 to "2", 3 to "3").<!EVALUATED: `true`!>containsKey(1)<!>
const val contains2 = mapOf(1 to "1", 2 to "2", 3 to "3").<!EVALUATED: `true`!>contains(1)<!>
const val contains3 = mapOf(1 to "1", 2 to "2", 3 to "3").<!EVALUATED: `false`!>contains<Any, String>("1")<!>
const val contains4 = mapOf(1 to "1", 2 to "2", 3 to "3").<!EVALUATED: `true`!>containsValue("1")<!>
const val contains1 = <!EVALUATED: `true`!>mapOf(1 to "1", 2 to "2", 3 to "3").containsKey(1)<!>
const val contains2 = <!EVALUATED: `true`!>mapOf(1 to "1", 2 to "2", 3 to "3").contains(1)<!>
const val contains3 = <!EVALUATED: `false`!>mapOf(1 to "1", 2 to "2", 3 to "3").contains<Any, String>("1")<!>
const val contains4 = <!EVALUATED: `true`!>mapOf(1 to "1", 2 to "2", 3 to "3").containsValue("1")<!>
const val get1 = mapOf(1 to "1", 2 to "2", 3 to "3").get(1)<!EVALUATED: `1`!>!!<!>
const val get2 = mapOf(1 to "1", 2 to "2", 3 to "3")[2]<!EVALUATED: `2`!>!!<!>
const val get3 = mapOf(1 to "1", 2 to "2", 3 to "3")[0].<!EVALUATED: `null`!>toString()<!>
const val get1 = <!EVALUATED: `1`!>mapOf(1 to "1", 2 to "2", 3 to "3").get(1)!!<!>
const val get2 = <!EVALUATED: `2`!>mapOf(1 to "1", 2 to "2", 3 to "3")[2]!!<!>
const val get3 = <!EVALUATED: `null`!>mapOf(1 to "1", 2 to "2", 3 to "3")[0].toString()<!>
const val keys = mapOf(1 to "1", 2 to "2", 3 to "3").keys.<!EVALUATED: `3`!>size<!>
const val values = mapOf(1 to "1", 2 to "2", 3 to "3").values.<!EVALUATED: `3`!>size<!>
const val entries = mapOf(1 to "1", 2 to "2", 3 to "3").entries.<!EVALUATED: `3`!>size<!>
const val keys = <!EVALUATED: `3`!>mapOf(1 to "1", 2 to "2", 3 to "3").keys.size<!>
const val values = <!EVALUATED: `3`!>mapOf(1 to "1", 2 to "2", 3 to "3").values.size<!>
const val entries = <!EVALUATED: `3`!>mapOf(1 to "1", 2 to "2", 3 to "3").entries.size<!>
@@ -27,11 +27,11 @@ fun testIterator(mutableList: MutableList<Byte>): String {
return "Sum = " + sum
}
const val emptyMutableListSize = mutableListOf<Any>().<!EVALUATED: `0`!>size<!>
const val mutableListSize = mutableListOf(1, 2, 3).<!EVALUATED: `3`!>size<!>
const val emptyMutableListSize = <!EVALUATED: `0`!>mutableListOf<Any>().size<!>
const val mutableListSize = <!EVALUATED: `3`!>mutableListOf(1, 2, 3).size<!>
const val mutableListAdd = <!EVALUATED: `After add new size is 4`!>testAdd(mutableListOf(1, 2, 3), 4)<!>
const val mutableListRemove1 = <!EVALUATED: `After remove new size is 2`!>testRemove(mutableListOf("1", "2", "3"), "1")<!>
const val mutableListRemove2 = <!EVALUATED: `After remove new size is 3`!>testRemove(mutableListOf("1", "2", "3"), "4")<!>
const val mutableListAddAll = <!EVALUATED: `After addAll new size is 5`!>testAddAll(mutableListOf(1.0, 2.0, 3.0), listOf(4.333, -5.5))<!>
const val mutableListSum = <!EVALUATED: `Sum = 136`!>testIterator(mutableListOf<Byte>(1, (-2).toByte(), 127, 10, 0))<!>
const val mutableListSubList = mutableListOf(1, 2, 3, 4).subList(0, 2).<!EVALUATED: `2`!>size<!>
const val mutableListSubList = <!EVALUATED: `2`!>mutableListOf(1, 2, 3, 4).subList(0, 2).size<!>
@@ -1,6 +1,6 @@
import kotlin.*
import kotlin.collections.*
const val a1 = mutableMapOf(1 to "1", 2 to "2", 3 to "3").<!EVALUATED: `3`!>size<!>
const val a2 = mutableMapOf(1 to "1", 2 to "2", 3 to "3").apply { remove(1) }.<!EVALUATED: `2`!>size<!>
const val a1 = <!EVALUATED: `3`!>mutableMapOf(1 to "1", 2 to "2", 3 to "3").size<!>
const val a2 = <!EVALUATED: `2`!>mutableMapOf(1 to "1", 2 to "2", 3 to "3").apply { remove(1) }.size<!>
@@ -27,8 +27,8 @@ fun testIterator(mutableSet: MutableSet<Byte>): String {
return "Sum = " + sum
}
const val emptyMutableSetSize = mutableSetOf<Any>().<!EVALUATED: `0`!>size<!>
const val mutableSetSize = mutableSetOf(1, 2, 3).<!EVALUATED: `3`!>size<!>
const val emptyMutableSetSize = <!EVALUATED: `0`!>mutableSetOf<Any>().size<!>
const val mutableSetSize = <!EVALUATED: `3`!>mutableSetOf(1, 2, 3).size<!>
const val mutableSetAdd = <!EVALUATED: `After add new size is 4`!>testAdd(mutableSetOf(1, 2, 3), 4)<!>
const val mutableSetRemove1 = <!EVALUATED: `After remove new size is 2`!>testRemove(mutableSetOf("1", "2", "3"), "1")<!>
const val mutableSetRemove2 = <!EVALUATED: `After remove new size is 3`!>testRemove(mutableSetOf("1", "2", "3"), "4")<!>
+4 -4
View File
@@ -1,6 +1,6 @@
import kotlin.sequences.*
const val a = sequenceOf(1, 2, 3).iterator().<!EVALUATED: `1`!>next()<!>
const val b = sequenceOf(2, 3).iterator().<!EVALUATED: `2`!>next()<!>
const val c = sequenceOf<Int>().iterator().<!EVALUATED: `false`!>hasNext()<!>
const val d = generateSequence() { 42 }.iterator().<!EVALUATED: `42`!>next()<!>
const val a = <!EVALUATED: `1`!>sequenceOf(1, 2, 3).iterator().next()<!>
const val b = <!EVALUATED: `2`!>sequenceOf(2, 3).iterator().next()<!>
const val c = <!EVALUATED: `false`!>sequenceOf<Int>().iterator().hasNext()<!>
const val d = <!EVALUATED: `42`!>generateSequence() { 42 }.iterator().next()<!>
+4 -4
View File
@@ -1,9 +1,9 @@
import kotlin.collections.*
const val a1 = setOf(1, 2, 3).<!EVALUATED: `3`!>size<!>
const val a2 = setOf(1, 2, 3, 3, 2, 1).<!EVALUATED: `3`!>size<!>
const val b = emptySet<Int>().<!EVALUATED: `0`!>size<!>
const val c = setOf<Int>().<!EVALUATED: `0`!>hashCode()<!>
const val a1 = <!EVALUATED: `3`!>setOf(1, 2, 3).size<!>
const val a2 = <!EVALUATED: `3`!>setOf(1, 2, 3, 3, 2, 1).size<!>
const val b = <!EVALUATED: `0`!>emptySet<Int>().size<!>
const val c = <!EVALUATED: `0`!>setOf<Int>().hashCode()<!>
@CompileTimeCalculation
fun getSum(set: Set<Int>): Int {