JS backend: testFiles -> testData
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package foo
|
||||
|
||||
import js.*
|
||||
|
||||
fun box(): Boolean {
|
||||
|
||||
var twoToFive = IntRange(2, 5)
|
||||
|
||||
if (twoToFive.contains(6)) return false;
|
||||
if (twoToFive.contains(1)) return false;
|
||||
if (twoToFive.contains(0)) return false;
|
||||
if (twoToFive.contains(-100)) return false;
|
||||
if (twoToFive.contains(10)) return false;
|
||||
if (!twoToFive.contains(2)) return false;
|
||||
if (!twoToFive.contains(3)) return false;
|
||||
if (!twoToFive.contains(4)) return false;
|
||||
if (!twoToFive.contains(5)) return false;
|
||||
if (!(twoToFive.start == 2)) return false;
|
||||
if (!(twoToFive.end == 5)) return false;
|
||||
|
||||
var sum = 0;
|
||||
for (i in twoToFive) {
|
||||
sum += i;
|
||||
}
|
||||
|
||||
if (sum != 14) return false;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user