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