JS: char boxing
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
package foo
|
||||
|
||||
class Fail(message: String) : Exception(message)
|
||||
@@ -22,7 +23,7 @@ fun box(): String {
|
||||
try {
|
||||
test("arrayOf", arrayOf(0, 1, 2, 3, 4), "0, 1, 2, 3, 4")
|
||||
test("booleanArrayOf", booleanArrayOf(true, false, false, true, true), "true, false, false, true, true")
|
||||
test("charArray'", charArrayOf('0', '1', '2', '3', '4'), "'0', '1', '2', '3', '4'")
|
||||
test("charArray'", charArrayOf('0', '1', '2', '3', '4'), "48, 49, 50, 51, 52")
|
||||
test("byteArrayOf", byteArrayOf(0, 1, 2, 3, 4), "0, 1, 2, 3, 4")
|
||||
test("shortArrayOf", shortArrayOf(0, 1, 2, 3, 4), "0, 1, 2, 3, 4")
|
||||
test("intArray,", intArrayOf(0, 1, 2, 3, 4), "0, 1, 2, 3, 4")
|
||||
|
||||
@@ -66,7 +66,7 @@ fun box(): String {
|
||||
|
||||
val mapWithCharKeys = HashMap<Char, Int>()
|
||||
mapWithCharKeys['A'] = 1
|
||||
assertEquals("string", jsTypeOf (mapWithCharKeys.keys.iterator().next()), "mapWithCharKeys")
|
||||
assertEquals("object", jsTypeOf (mapWithCharKeys.keys.iterator().next()), "mapWithCharKeys")
|
||||
|
||||
val mapWithLongKeys = HashMap<Long, Int>()
|
||||
mapWithLongKeys[1L] = 1
|
||||
|
||||
@@ -52,7 +52,7 @@ fun box(): String {
|
||||
|
||||
val charSet = HashSet<Char>()
|
||||
charSet.add('A')
|
||||
assertEquals("string", jsTypeOf (charSet.iterator().next()), "charSet")
|
||||
assertEquals("object", jsTypeOf (charSet.iterator().next()), "charSet")
|
||||
|
||||
val longSet = HashSet<Long>()
|
||||
longSet.add(1L)
|
||||
|
||||
Reference in New Issue
Block a user