Scratch: tests for repl execution
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
for (i in 0..5) {
|
||||
println(i)
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
for (i in 0..5) { // OUTPUT: 0; 1; 2; 3; 4; 5
|
||||
println(i)
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
val a = 1
|
||||
a
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
val a = 1
|
||||
a // RESULT: 1
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
foo()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
foo() // RESULT: 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
arrayListOf(1, 5, 7).map { it * 2 } // RESULT: 2
|
||||
.filter { it < 10 }
|
||||
.find { it == 2 }
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
arrayListOf(1, 5, 7).map { it * 2 }
|
||||
.filter { it < 10 }
|
||||
.find { it == 2 }
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
arrayListOf(1, 5, 7).map { it * 2 } // RESULT: 2
|
||||
.filter { it < 10 }
|
||||
.find { it == 2 }
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
foo()
|
||||
+1
@@ -0,0 +1 @@
|
||||
foo() // ERROR: error: unresolved reference: foo
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
println("hello")
|
||||
+1
@@ -0,0 +1 @@
|
||||
println("hello") // OUTPUT: hello
|
||||
Reference in New Issue
Block a user