IR to CFG test generator, sequential function tests
This commit is contained in:
committed by
Dmitry Petrov
parent
65db7aa1ba
commit
eaf10a4675
+1
@@ -0,0 +1 @@
|
||||
fun foo(arg: Int) = arg
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: /expressionFun.kt
|
||||
// FUN: foo
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun foo(arg: kotlin.Int): kotlin.Int
|
||||
2 GET_VAR 'value-parameter arg: Int' type=kotlin.Int origin=null
|
||||
3 RETURN type=kotlin.Nothing from='foo(Int): Int'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun foo(arg: kotlin.Int): kotlin.Int
|
||||
|
||||
// END FUN: foo
|
||||
|
||||
// END FILE: /expressionFun.kt
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
fun foo() = Unit
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: /expressionUnit.kt
|
||||
// FUN: foo
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun foo(): kotlin.Unit
|
||||
2 GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
3 RETURN type=kotlin.Nothing from='foo(): Unit'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun foo(): kotlin.Unit
|
||||
|
||||
// END FUN: foo
|
||||
|
||||
// END FILE: /expressionUnit.kt
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
return Unit
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: /returnUnit.kt
|
||||
// FUN: foo
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun foo(): kotlin.Unit
|
||||
2 GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
3 RETURN type=kotlin.Nothing from='foo(): Unit'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun foo(): kotlin.Unit
|
||||
|
||||
// END FUN: foo
|
||||
|
||||
// END FILE: /returnUnit.kt
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(arg: Int): Int {
|
||||
val dbl = arg * 2
|
||||
return dbl
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: /sequentialFun.kt
|
||||
// FUN: foo
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun foo(arg: kotlin.Int): kotlin.Int
|
||||
2 CALL 'times(Int): Int' type=kotlin.Int origin=MUL
|
||||
3 VAR val dbl: kotlin.Int
|
||||
4 GET_VAR 'dbl: Int' type=kotlin.Int origin=null
|
||||
5 RETURN type=kotlin.Nothing from='foo(Int): Int'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun foo(arg: kotlin.Int): kotlin.Int
|
||||
|
||||
// END FUN: foo
|
||||
|
||||
// END FILE: /sequentialFun.kt
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun foo() {}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// FILE: /simpleFun.kt
|
||||
// FUN: foo
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun foo(): kotlin.Unit
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun foo(): kotlin.Unit
|
||||
|
||||
// END FUN: foo
|
||||
|
||||
// END FILE: /simpleFun.kt
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
return
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: /simpleReturn.kt
|
||||
// FUN: foo
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun foo(): kotlin.Unit
|
||||
2 GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
3 RETURN type=kotlin.Nothing from='foo(): Unit'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun foo(): kotlin.Unit
|
||||
|
||||
// END FUN: foo
|
||||
|
||||
// END FILE: /simpleReturn.kt
|
||||
|
||||
Reference in New Issue
Block a user