Converter tests:

Use generated tests approach in converter tests

Introduce two seperate generated test cases of each of configurations, all tests are generated in both test cases
Test data for plugin configuration has extension "ide.kt", for basic configuration "*.kt"
Test data file is used to determine type of the test (file/class/expression/...) instead of directory, all test data is moved accordingly
Add abstract base classes for generated tests
Rename test folder "file" to "misc" (for the lack of imagination)
This commit is contained in:
Pavel V. Talanov
2013-11-16 16:30:24 +04:00
parent cba8d3b6db
commit 82b19499e3
1091 changed files with 7197 additions and 230 deletions
@@ -0,0 +1,20 @@
package test
public open class Test(str : String) {
var myStr : String = "String2"
public open fun sout(str : String) : Unit {
System.out.println(str)
}
public open fun dummy(str : String) : String {
return str
}
public open fun test() : Unit {
sout("String")
val test = "String2"
sout(test)
sout(dummy(test))
Test(test)
}
{
myStr = str
}
}
@@ -1,3 +1,4 @@
//file
package test;
import org.jetbrains.annotations.NotNull;
@@ -0,0 +1,17 @@
package test
open class Foo() {
open fun execute() : Unit {
}
}
open class Bar() {
var fooNotNull : Foo = Foo()
var fooNullable : Foo = null
}
open class Test() {
public open fun test(barNotNull : Bar, barNullable : Bar) : Unit {
barNotNull.fooNotNull.execute()
barNotNull.fooNullable.execute()
barNullable.fooNotNull.execute()
barNullable.fooNullable.execute()
}
}
@@ -1,3 +1,4 @@
//file
package test;
import org.jetbrains.annotations.NotNull;
@@ -0,0 +1,6 @@
open class Test() {
var str : String = 0
{
str = "Ola"
}
}
@@ -0,0 +1,8 @@
open class Test() {
var str : String = 0
class object {
{
str = "Ola"
}
}
}
@@ -0,0 +1,2 @@
//expression
myArray[myLibrary.calculateIndex(100)]
@@ -0,0 +1,2 @@
//expression
myArray[10]
@@ -0,0 +1,2 @@
//expression
myArray[i]
@@ -0,0 +1 @@
val a = doubleArray(1.0, 2.0, 3.0)
@@ -0,0 +1,4 @@
val a = 0
val b = 0
val c = 0
val ds = doubleArray((a).toDouble(), (b).toDouble(), (c).toDouble())
@@ -0,0 +1 @@
val a = floatArray(1.0, 2.0, 3.0)
@@ -0,0 +1 @@
val a = IntArray(10)
@@ -0,0 +1 @@
val a = array<java.lang.Double>(1.0, 2.0, 3.0)
@@ -1 +1,2 @@
//statement
java.lang.Double[] a = new java.lang.Double[]{1, 2, 3};
@@ -0,0 +1 @@
val a = array<java.lang.Float>(1.0, 2.0, 3.0)
@@ -1 +1,2 @@
//statement
java.lang.Float[] a = new java.lang.Float[]{1, 2, 3};
@@ -0,0 +1 @@
val a = byteArray(1, 2, 3)
@@ -0,0 +1 @@
intArray(1, 2, 3)
@@ -0,0 +1 @@
val a = arrayOfNulls<Any>(10)
@@ -0,0 +1 @@
val a = intArray(1, 2, 3)
@@ -0,0 +1,4 @@
val a = 0
val b = 0
val c = 0
val `is` = intArray(a, b, c)
@@ -0,0 +1 @@
val a = array<IntArray>(intArray(1, 2, 3), intArray(4, 5, 6), intArray(7, 8, 9))
@@ -1 +1,2 @@
//statement
int[][] a = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} };
@@ -0,0 +1 @@
val d2 = array<IntArray>()
@@ -0,0 +1 @@
val d2 = arrayOfNulls<IntArray>(5)
@@ -0,0 +1 @@
val d3 = Array<Array<IntArray>>(5, {arrayOfNulls<IntArray>(5)})
@@ -0,0 +1 @@
val d2 = Array<IntArray>(5, {IntArray(5)})
@@ -0,0 +1 @@
val ss = Array<Array<String>>(5, {arrayOfNulls<String>(5)})
@@ -1 +1,2 @@
//statement
String [][] ss = new String[5][5];
@@ -0,0 +1 @@
val sss = Array<Array<Array<String>>>(5, {Array<Array<String>>(5, {arrayOfNulls<String>(5)})})
@@ -1 +1,2 @@
//statement
String [][][] sss = new String[5][5][5];
@@ -0,0 +1 @@
val a = longArray(1, 2, 3)
@@ -1 +1,2 @@
//statement
long[] a = new long[]{1, 2, 3}
@@ -0,0 +1,2 @@
fun fromArrayToCollection(a : Array<Foo>) : Unit {
}
@@ -1 +1,2 @@
//method
void fromArrayToCollection(Foo[] a) {}
@@ -0,0 +1 @@
val a = intArray(1, 2, 3)
@@ -1 +1,2 @@
//statement
int[] a = new int[]{1, 2, 3}
@@ -0,0 +1 @@
val a = array<String>("abc")
@@ -1 +1,2 @@
//statement
String[] a = new String[]{"abc"}
@@ -0,0 +1 @@
assert {boolMethod()}
@@ -0,0 +1 @@
assert {(boolMethod())}
@@ -0,0 +1 @@
assert("string details") {true}
@@ -0,0 +1,2 @@
//expression
x &= 2
@@ -0,0 +1 @@
x = x and 2

Some files were not shown because too many files have changed in this diff Show More