Make some tests JVM only

This commit is contained in:
Ilya Gorbunov
2016-11-17 00:13:18 +03:00
parent 38840bb529
commit 0899a0fdda
38 changed files with 52 additions and 523 deletions
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
import java.util.ArrayList
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
import java.util.AbstractList
class A : AbstractList<String>() {
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
import java.util.AbstractMap
import java.util.Collections
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: Test.java
@@ -1,13 +1,11 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
import java.util.Collections
// TARGET_BACKEND: JVM
// WITH_RUNTIME
class A<U : Number, V : U, W : V> : Set<W> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override fun contains(o: W): Boolean = false
override fun iterator(): Iterator<W> = Collections.emptySet<W>().iterator()
override fun iterator(): Iterator<W> = emptySet<W>().iterator()
override fun containsAll(c: Collection<W>): Boolean = c.isEmpty()
}
+2
View File
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
import java.util.AbstractList
class MyList(): AbstractList<String>() {
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FILE: J.java
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FULL_JDK
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FULL_JDK
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FULL_JDK
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FULL_JDK
@@ -1,20 +1,19 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FULL_JDK
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.CountDownLatch
import java.util.concurrent.locks.ReentrantLock
fun <T> Int.latch(op: CountDownLatch.() -> T) : T {
fun <T> Int.latch(op: CountDownLatch.() -> T) : T {
val cdl = CountDownLatch(this)
val res = cdl.op()
cdl.await()
return res
}
fun id(op : ()->Unit) = op()
fun id(op: () -> Unit) = op()
fun box() : String {
1.latch{
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FULL_JDK
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// FULL_JDK
@@ -1,7 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
import java.util.HashSet
// TARGET_BACKEND: JVM
fun box(): String {
val a = HashSet<String>()
@@ -1,7 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
import java.util.ArrayList
// TARGET_BACKEND: JVM
open class A : Cloneable {
public override fun clone(): A = super.clone() as A
+1 -2
View File
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_RUNTIME
+1 -4
View File
@@ -1,7 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
import java.util.ArrayList
// TARGET_BACKEND: JVM
public object SomeObject {
private val workerThread = object : Thread() {
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_REFLECT
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_REFLECT
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_REFLECT
// FILE: J.java
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_REFLECT
// FILE: J.java
+3 -3
View File
@@ -1,12 +1,12 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FULL_JDK
package testeval
import java.util.*
import java.util.LinkedList
import java.util.Deque
interface Expression
class Num(val value : Int) : Expression
+2 -4
View File
@@ -1,17 +1,15 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FULL_JDK
package pack
import java.util.ArrayList
import java.util.regex.Pattern
class C{
public fun foo(){
val items : Collection<Item> = java.util.Collections.singleton(Item())!!
val items : Collection<Item> = listOf(Item())
val result = ArrayList<Item>()
val pattern: Pattern? = Pattern.compile("...")
items.filterTo(result) {
+4 -7
View File
@@ -1,14 +1,11 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_RUNTIME
import java.util.Arrays
class MyCollection<T>(val delegate: Collection<T>): Collection<T> by delegate
fun box(): String {
val collection = MyCollection(Arrays.asList(2, 3, 9)) as java.util.Collection<*>
val collection = MyCollection(listOf(2, 3, 9)) as java.util.Collection<*>
val array1 = collection.toArray()
val array2 = collection.toArray(arrayOfNulls<Int>(3) as Array<Int>)
@@ -16,8 +13,8 @@ fun box(): String {
if (!array1.isArrayOf<Any>()) return (array1 as Object).getClass().toString()
if (!array2.isArrayOf<Int>()) return (array2 as Object).getClass().toString()
val s1 = Arrays.toString(array1)
val s2 = Arrays.toString(array2)
val s1 = array1.contentToString()
val s2 = array2.contentToString()
if (s1 != "[2, 3, 9]") return "s1 = $s1"
if (s2 != "[2, 3, 9]") return "s2 = $s2"
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// TARGET_BACKEND: JVM
// WITH_RUNTIME