Generate EXPECTED_REACHABLE_NODES directive on JS box tests

This commit is contained in:
Alexey Andreev
2017-04-25 19:05:55 +03:00
parent ab9b639652
commit e2c2fcf1ff
1153 changed files with 1154 additions and 4 deletions
+1
View File
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 905
interface Tr {
fun extra(): String = "_"
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 507
open class M() {
open var b: Int = 0
}
+1
View File
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 495
class C() {
companion object {
fun create() = C()
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 489
fun box(): String {
return apply("OK", { arg: String -> arg })
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 489
fun box(): String {
return if (apply(5) { arg: Int -> arg + 13 } == 18) "OK" else "fail"
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 491
fun box(): String {
val cl = 39
return if (sum(200, { val ff = { cl }; ff() }) == 239) "OK" else "FAIL"
+1
View File
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 525
interface BK {
fun x(): Int = 50
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 492
fun box(): String {
val cl = 39
return if (sum(200, { val m = { val r = { cl }; r() }; m() }) == 239) "OK" else "FAIL"
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 491
class Point(val x: Int, val y: Int)
fun box(): String {
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 504
open class Base() {
fun n(n: Int): Int = n + 1
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 491
class Slot() {
var vitality: Int = 10000
+1
View File
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 526
// Changed when traits were introduced. May not make sense any more
open class X(val x: Int) {
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 498
class Outer() {
open class InnerBase() {
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 499
open class Foo() {
fun xyzzy(): String = "xyzzy"
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 489
class C() {
public var f: Int
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 890
class World() {
public val items: ArrayList<Item> = ArrayList<Item>()
+1
View File
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 511
class Outer(val foo: StringBuilder) {
inner class Inner() {
fun len(): Int {
+1
View File
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 487
fun box(): String {
val i: Int? = 7
val j: Int? = null
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 491
class SimpleClass() {
fun foo() = 610
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 891
class ArrayWrapper<T>() {
val contents = ArrayList<T>()
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 892
class ArrayWrapper<T>() {
val contents = ArrayList<T>()
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 892
class ArrayWrapper<T>() {
val contents = ArrayList<T>()
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 892
class ArrayWrapper<T>() {
val contents = ArrayList<T>()
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 506
open class Base() {
val plain = 239
public val read: Int
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 498
class Outer() {
val s = "xyzzy"
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 500
// Changed when traits were introduced. May not make sense any more
interface Left {
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 489
fun box(): String {
return invoker({ "OK" })
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 489
fun box(): String {
return if (int_invoker({ 7 }) == 7) "OK" else "fail"
}
@@ -1,3 +1,4 @@
// EXPECTED_REACHABLE_NODES: 503
interface M {
var backingB: Int
var b: Int