[JS TESTS] Rewrite web demo tests using new test infrastructure
This commit is contained in:
@@ -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() {
|
||||
}
|
||||
Reference in New Issue
Block a user