Minor in JS: use toTypedArray in JS tests

This commit is contained in:
Alexey Tsvetkov
2015-04-24 19:28:08 +03:00
parent 8cdff2439b
commit 2c99484066
2 changed files with 2 additions and 2 deletions
@@ -42,7 +42,7 @@ fun box(): Boolean {
assertEquals(true, a.isEmpty(), "a.isEmpty()")
assertEquals(array(1, 500, 2, 3), list.copyToArray(), "list.copyToArray()")
assertEquals(array(1, 500, 2, 3), list.toTypedArray(), "list.copyToArray()")
assertEquals("[1,500,2,3]", JSON.stringify(list), "JSON.stringify(list)")
assertEquals("[1, 500, 2, 3]", list.toString(), "list.toString()")
return true;
@@ -12,6 +12,6 @@ fun box(): Boolean {
// test addAt
list.add(1, 500)
val array = list.copyToArray()
val array = list.toTypedArray()
return array[0] == 1 && array[1] == 500 && array[2] == 2 && array[3] == 3 && JSON.stringify(list) == "[1,500,2,3]";
}