JS: fix tests related to 1.3 migration
This commit is contained in:
committed by
Zalim Bashorov
parent
3a8499b10e
commit
e7f9727783
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR, JS, JS_IR
|
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||||
// WITH_UNSIGNED
|
// WITH_UNSIGNED
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+18
-18
@@ -1,5 +1,5 @@
|
|||||||
// WITH_UNSIGNED
|
// WITH_UNSIGNED
|
||||||
// IGNORE_BACKEND: JS_IR, JVM_IR, JS
|
// IGNORE_BACKEND: JS_IR, JVM_IR
|
||||||
|
|
||||||
fun prefixDecrementUByteLocal(): Any? {
|
fun prefixDecrementUByteLocal(): Any? {
|
||||||
var a: UByte = 0u
|
var a: UByte = 0u
|
||||||
@@ -89,29 +89,29 @@ fun prefixIncrementULongProperty(): Any? {
|
|||||||
fun check(u: Any?, ts: String, className: String) {
|
fun check(u: Any?, ts: String, className: String) {
|
||||||
u!!
|
u!!
|
||||||
if (u.toString() != ts) throw AssertionError(u.toString())
|
if (u.toString() != ts) throw AssertionError(u.toString())
|
||||||
if (u.javaClass.name != className) throw AssertionError(u.javaClass.name)
|
if (u::class.simpleName != className) throw AssertionError(u::class.simpleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
check(prefixDecrementUByteLocal(), 0xFFu.toString(), "kotlin.UByte")
|
check(prefixDecrementUByteLocal(), 0xFFu.toString(), "UByte")
|
||||||
check(prefixDecrementUShortLocal(), 0xFFFFu.toString(), "kotlin.UShort")
|
check(prefixDecrementUShortLocal(), 0xFFFFu.toString(), "UShort")
|
||||||
check(prefixDecrementUIntLocal(), 0xFFFF_FFFFu.toString(), "kotlin.UInt")
|
check(prefixDecrementUIntLocal(), 0xFFFF_FFFFu.toString(), "UInt")
|
||||||
check(prefixDecrementULongLocal(), 0xFFFF_FFFF_FFFF_FFFFUL.toString(), "kotlin.ULong")
|
check(prefixDecrementULongLocal(), 0xFFFF_FFFF_FFFF_FFFFUL.toString(), "ULong")
|
||||||
|
|
||||||
check(prefixIncrementUByteLocal(), "1", "kotlin.UByte")
|
check(prefixIncrementUByteLocal(), "1", "UByte")
|
||||||
check(prefixIncrementUShortLocal(), "1", "kotlin.UShort")
|
check(prefixIncrementUShortLocal(), "1", "UShort")
|
||||||
check(prefixIncrementUIntLocal(), "1", "kotlin.UInt")
|
check(prefixIncrementUIntLocal(), "1", "UInt")
|
||||||
check(prefixIncrementULongLocal(), "1", "kotlin.ULong")
|
check(prefixIncrementULongLocal(), "1", "ULong")
|
||||||
|
|
||||||
check(prefixDecrementUByteProperty(), 0xFFu.toString(), "kotlin.UByte")
|
check(prefixDecrementUByteProperty(), 0xFFu.toString(), "UByte")
|
||||||
check(prefixDecrementUShortProperty(), 0xFFFFu.toString(), "kotlin.UShort")
|
check(prefixDecrementUShortProperty(), 0xFFFFu.toString(), "UShort")
|
||||||
check(prefixDecrementUIntProperty(), 0xFFFF_FFFFu.toString(), "kotlin.UInt")
|
check(prefixDecrementUIntProperty(), 0xFFFF_FFFFu.toString(), "UInt")
|
||||||
check(prefixDecrementULongProperty(), 0xFFFF_FFFF_FFFF_FFFFUL.toString(), "kotlin.ULong")
|
check(prefixDecrementULongProperty(), 0xFFFF_FFFF_FFFF_FFFFUL.toString(), "ULong")
|
||||||
|
|
||||||
check(prefixIncrementUByteProperty(), "1", "kotlin.UByte")
|
check(prefixIncrementUByteProperty(), "1", "UByte")
|
||||||
check(prefixIncrementUShortProperty(), "1", "kotlin.UShort")
|
check(prefixIncrementUShortProperty(), "1", "UShort")
|
||||||
check(prefixIncrementUIntProperty(), "1", "kotlin.UInt")
|
check(prefixIncrementUIntProperty(), "1", "UInt")
|
||||||
check(prefixIncrementULongProperty(), "1", "kotlin.ULong")
|
check(prefixIncrementULongProperty(), "1", "ULong")
|
||||||
|
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
@@ -61,6 +61,18 @@ public class Char(value: Int) : Comparable<Char> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
/**
|
||||||
|
* The minimum value of a character code unit.
|
||||||
|
*/
|
||||||
|
@SinceKotlin("1.3")
|
||||||
|
public const val MIN_VALUE: Char = '\u0000'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum value of a character code unit.
|
||||||
|
*/
|
||||||
|
@SinceKotlin("1.3")
|
||||||
|
public const val MAX_VALUE: Char = '\uFFFF'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The minimum value of a Unicode high-surrogate code unit.
|
* The minimum value of a Unicode high-surrogate code unit.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user