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
@@ -1 +1,2 @@
//method
abstract int getNoofGears();
@@ -0,0 +1 @@
abstract fun getNoofGears() : Int
@@ -0,0 +1,2 @@
fun getT() : T {
}
@@ -0,0 +1,2 @@
fun main() : Unit {
}
@@ -0,0 +1,35 @@
package test
open class Test() : Base() {
public override fun hashCode() : Int {
return super.hashCode()
}
public override fun equals(o : Any) : Boolean {
return super.equals(o)
}
protected override fun clone() : Any {
return super.clone()
}
public override fun toString() : String {
return super.toString()
}
protected override fun finalize() : Unit {
super.finalize()
}
}
open class Base() {
public open fun hashCode() : Int {
return System.identityHashCode(this)
}
public open fun equals(o : Any) : Boolean {
return this.identityEquals(o)
}
protected open fun clone() : Any {
return super.clone()
}
public open fun toString() : String {
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
}
protected open fun finalize() : Unit {
super.finalize()
}
}
@@ -0,0 +1,3 @@
fun getString() : String {
return ""
}
@@ -1 +1,2 @@
//method
final String getString() { return ""; }
@@ -1,3 +1,4 @@
//file
package demo;
final class Final {
@@ -0,0 +1,5 @@
package demo
class Final() {
fun test() : Unit {
}
}
@@ -0,0 +1,2 @@
fun test() : Unit {
}
@@ -0,0 +1,4 @@
class object {
public fun main(args : Array<String>) : Unit {
}
}
@@ -1 +1,2 @@
//method
public static void main(String[] args) {}
@@ -0,0 +1,2 @@
fun main() : String {
}
@@ -0,0 +1,2 @@
fun main() : Int {
}
@@ -0,0 +1,2 @@
fun main() : Boolean {
}
@@ -0,0 +1,3 @@
fun isTrue() : Boolean {
return true
}
@@ -0,0 +1,3 @@
fun getString() : String {
return ""
}
@@ -1 +1,2 @@
//method
String getString() { return ""; }
@@ -1 +1,2 @@
//file
class A {void a() {}} final class B extends A {void a() {}}
@@ -0,0 +1,8 @@
open class A() {
open fun a() : Unit {
}
}
class B() : A() {
override fun a() : Unit {
}
}
@@ -1,3 +1,4 @@
//file
class A {
void foo() {}
}
@@ -0,0 +1,12 @@
open class A() {
open fun foo() : Unit {
}
}
open class B() : A() {
override fun foo() : Unit {
}
}
open class C() : B() {
override fun foo() : Unit {
}
}
@@ -0,0 +1,18 @@
package test
open class Test() {
public open fun hashCode() : Int {
return System.identityHashCode(this)
}
public open fun equals(o : Any) : Boolean {
return this.identityEquals(o)
}
protected open fun clone() : Any {
return super.clone()
}
public open fun toString() : String {
return getJavaClass<Test>.getName() + '@' + Integer.toHexString(hashCode())
}
protected open fun finalize() : Unit {
super.finalize()
}
}
@@ -1,3 +1,4 @@
//file
package test;
class Test {
@@ -0,0 +1,2 @@
fun putU<U>(u : U) : Unit {
}
@@ -0,0 +1,2 @@
fun putUVW<U, V, W>(u : U, v : V, w : W) : Unit {
}
@@ -1 +1,2 @@
//method
<U, V, W> void putUVW(U u, V v, W w) {}
@@ -1 +1,2 @@
//method
private void test() {}
@@ -0,0 +1,2 @@
private fun test() : Unit {
}
@@ -1 +1,2 @@
//method
protected void test() {}
@@ -0,0 +1,2 @@
protected fun test() : Unit {
}
@@ -1 +1,2 @@
//method
public void test() {}
@@ -0,0 +1,2 @@
public fun test() : Unit {
}
@@ -0,0 +1,6 @@
package demo
open class Test() {
open fun test(vararg var args : Any) : Unit {
args = array<Int>(1, 2, 3)
}
}
@@ -1,3 +1,4 @@
//file
package demo;
class Test {
@@ -0,0 +1,7 @@
package demo
open class Test() {
open fun test(var i : Int) : Int {
i = 10
return i + 20
}
}