Add ir interpreter tests

This commit is contained in:
Ivan Kylchik
2021-05-19 16:27:03 +03:00
committed by TeamCityServer
parent cc2d7340dc
commit e28ab45c51
115 changed files with 5104 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
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()<!>
@CompileTimeCalculation
fun getSum(set: Set<Int>): Int {
var sum: Int = 0
for (element in set) {
sum += element
}
return sum
}
const val sum = <!EVALUATED: `16`!>getSum(setOf(1, 3, 5, 7, 7, 5))<!>