Make several tests running on JS backend.
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
class MItr : MutableIterator<String> by ArrayList<String>().iterator()
|
||||
class LItr : ListIterator<String> by ArrayList<String>().listIterator()
|
||||
@@ -37,7 +32,7 @@ inline fun asFailsWithCCE(operation: String, block: () -> Unit) {
|
||||
try {
|
||||
block()
|
||||
}
|
||||
catch (e: java.lang.ClassCastException) {
|
||||
catch (e: ClassCastException) {
|
||||
return
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
class MItr : MutableIterator<String> by ArrayList<String>().iterator()
|
||||
class LItr : ListIterator<String> by ArrayList<String>().listIterator()
|
||||
@@ -33,6 +28,8 @@ class MME : MutableMap.MutableEntry<String, String> {
|
||||
override fun setValue(value: String): String = throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
fun assert(condition: Boolean, message: () -> String) { if (!condition) throw AssertionError(message())}
|
||||
|
||||
fun box(): String {
|
||||
val itr = Itr() as Any
|
||||
val mitr = MItr()
|
||||
|
||||
+1
-6
@@ -1,10 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
class MItr : MutableIterator<String> by ArrayList<String>().iterator()
|
||||
class LItr : ListIterator<String> by ArrayList<String>().listIterator()
|
||||
@@ -46,7 +41,7 @@ inline fun <reified T> reifiedAsFailsWithCCE(x: Any, operation: String) {
|
||||
try {
|
||||
x as T
|
||||
}
|
||||
catch (e: java.lang.ClassCastException) {
|
||||
catch (e: ClassCastException) {
|
||||
return
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
|
||||
+2
-5
@@ -1,10 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
class MItr : MutableIterator<String> by ArrayList<String>().iterator()
|
||||
class LItr : ListIterator<String> by ArrayList<String>().listIterator()
|
||||
@@ -36,6 +31,8 @@ class MME : MutableMap.MutableEntry<String, String> {
|
||||
inline fun <reified T> reifiedIs(x: Any): Boolean = x is T
|
||||
inline fun <reified T> reifiedIsNot(x: Any): Boolean = x !is T
|
||||
|
||||
fun assert(condition: Boolean, message: () -> String) { if (!condition) throw AssertionError(message())}
|
||||
|
||||
fun box(): String {
|
||||
val itr = Itr() as Any
|
||||
val mitr = MItr()
|
||||
|
||||
+3
-5
@@ -1,10 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
class MItr : MutableIterator<String> by ArrayList<String>().iterator()
|
||||
class LItr : ListIterator<String> by ArrayList<String>().listIterator()
|
||||
@@ -33,6 +28,9 @@ class MME : MutableMap.MutableEntry<String, String> {
|
||||
override fun setValue(value: String): String = throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
fun assert(condition: Boolean, message: () -> String) { if (!condition) throw AssertionError(message())}
|
||||
|
||||
|
||||
inline fun safeAsReturnsNull(operation: String, cast: () -> Any?) {
|
||||
try {
|
||||
val x = cast()
|
||||
|
||||
Reference in New Issue
Block a user