[JS TESTS] Rewrite web demo tests using new test infrastructure

This commit is contained in:
Ivan Kylchik
2021-10-20 22:15:16 +03:00
parent af0e40a0d2
commit 8a1362de03
45 changed files with 369 additions and 579 deletions
@@ -0,0 +1,20 @@
// MAIN_ARGS: []
fun main(args: Array<String>) {
cases("Hello")
cases(1)
cases(MyClass())
cases("hello")
}
fun cases(obj: Any) {
when(obj) {
1 -> println("One")
"Hello" -> println("Greeting")
!is String -> println("Not a string")
else -> println("Unknown")
}
}
class MyClass() {
}