Make several tests running on JS backend.

This commit is contained in:
Ilya Gorbunov
2016-11-17 01:58:43 +03:00
parent 0899a0fdda
commit 62fe89b536
16 changed files with 48 additions and 196 deletions
@@ -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()