Add simple checker tests for scripts

This commit is contained in:
Pavel V. Talanov
2015-11-17 15:05:00 +03:00
parent daa1a08213
commit aebcebe8ca
6 changed files with 75 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
val c = true
if (c) {
2 + 3
}
fun f() {
if (!c) {
3 + 4
}
}
+3
View File
@@ -0,0 +1,3 @@
package org.my
val x = 1
+26
View File
@@ -0,0 +1,26 @@
fun f() {
}
fun g() {
f()
}
val c = 1
1 + 2
val k = f()
3 + 5
g()
f()
class C {
fun f() {
}
}
val cc = C()
cc.f()
@@ -0,0 +1,2 @@
val x = <error descr="[UNINITIALIZED_VARIABLE] Variable 'y' must be initialized">y</error>
val y = 3