JS: move inline test to box tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package foo
|
||||
|
||||
fun test(x: Boolean?): Boolean = fizz(x) ?: buzz(true)
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(true, test(null))
|
||||
assertEquals("fizz(null);buzz(true);", pullLog())
|
||||
assertEquals(false, test(false))
|
||||
assertEquals("fizz(false);", pullLog())
|
||||
assertEquals(true, test(true))
|
||||
assertEquals("fizz(true);", pullLog())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user