j2k: flatten test cases and testData directory structure

Move j2k/test/tests -> j2k/tests, j2k/test/testData -> j2k/testData
This commit is contained in:
Alexander Udalov
2015-01-03 00:49:40 +03:00
parent ed2f123b54
commit 3c859caf2b
1137 changed files with 1417 additions and 1412 deletions
@@ -0,0 +1,2 @@
//statement
when(open, trait);
@@ -0,0 +1 @@
`when`(open, `trait`)
@@ -0,0 +1,11 @@
import java.util.*;
class A {
Map<String, String> foo() {
List<String> list1 = Collections.emptyList();
List<Integer> list2 = Collections.singletonList(1);
Set<String> set1 = Collections.emptySet();
Set<String> set2 = Collections.singleton("a");
return Collections.emptyMap();
}
}
@@ -0,0 +1,11 @@
import java.util.*
class A {
fun foo(): Map<String, String> {
val list1 = listOf<String>()
val list2 = listOf(1)
val set1 = setOf<String>()
val set2 = setOf("a")
return mapOf()
}
}
@@ -0,0 +1,12 @@
import java.util.*
import kotlin.Map
class A {
fun foo(): Map<String, String> {
val list1 = listOf<String>()
val list2 = listOf(1)
val set1 = setOf<String>()
val set2 = setOf("a")
return mapOf()
}
}
@@ -0,0 +1,8 @@
import java.util.*;
class A {
void foo() {
List<String> list = Collections.singletonList(null);
Set<String> set = Collections.singleton(null);
}
}
@@ -0,0 +1,10 @@
// ERROR: Too many arguments for public fun <T> listOf(): kotlin.List<T> defined in kotlin
// ERROR: Too many arguments for public fun <T> setOf(): kotlin.Set<T> defined in kotlin
import java.util.*
class A {
fun foo() {
val list = listOf<String>(null)
val set = setOf<String>(null)
}
}
@@ -0,0 +1,2 @@
//statement
methodCall();
@@ -0,0 +1 @@
methodCall()
@@ -0,0 +1,13 @@
//file
package demo;
class Map {
<K, V> void put(K k, V v) {}
}
class U {
void test() {
Map m = new Map();
m.<String, int>put("10", 10);
}
}
@@ -0,0 +1,13 @@
package demo
class Map {
fun <K, V> put(k: K, v: V) {
}
}
class U {
fun test() {
val m = Map()
m.put<String, Int>("10", 10)
}
}
@@ -0,0 +1,6 @@
class A {
void foo(Object o) {
System.out.println(o.getClass());
System.out.println(getClass());
}
}
@@ -0,0 +1,6 @@
class A {
fun foo(o: Any) {
System.out.println(o.javaClass)
System.out.println(javaClass)
}
}
@@ -0,0 +1,2 @@
//statement
method(param1, param2);
@@ -0,0 +1 @@
method(param1, param2)
@@ -0,0 +1,9 @@
//file
import java.lang.reflect.Constructor;
class X {
static <T> void foo(Constructor<T> constructor, Object[] args1, Object[] args2) throws Exception {
constructor.newInstance(args1);
constructor.newInstance(args1, args2);
}
}
@@ -0,0 +1,11 @@
import java.lang.reflect.Constructor
class X {
class object {
throws(javaClass<Exception>())
fun <T> foo(constructor: Constructor<T>, args1: Array<Any>, args2: Array<Any>) {
constructor.newInstance(*args1)
constructor.newInstance(args1, args2)
}
}
}
@@ -0,0 +1,12 @@
//file
import javaApi.WithVarargConstructor;
import java.lang.String;
class X {
void foo() {
WithVarargConstructor o1 = new WithVarargConstructor(1, new Object[]{"a"});
WithVarargConstructor o2 = new WithVarargConstructor(2, new Object[]{"a"}, new Object[]{"b"});
WithVarargConstructor o3 = new WithVarargConstructor(2, "a");
}
}
@@ -0,0 +1,9 @@
import javaApi.WithVarargConstructor
class X {
fun foo() {
val o1 = WithVarargConstructor(1, *array<Any>("a"))
val o2 = WithVarargConstructor(2, array<Any>("a"), array<Any>("b"))
val o3 = WithVarargConstructor(2, "a")
}
}