Remove traces of 'boxWithStdlib' directory in other tests

This commit is contained in:
Alexander Udalov
2016-03-07 14:12:45 +03:00
committed by Alexander Udalov
parent 06a67e6602
commit e115f80d6c
46 changed files with 54 additions and 59 deletions
@@ -105,7 +105,7 @@ public class CodegenTestsOnAndroidRunner {
/* /*
Output example: Output example:
[exec] Error in testKt344: [exec] Error in testKt344:
[exec] java.lang.RuntimeException: File: compiler\testData\codegen\boxWithStdlib\regressions\kt344.kt [exec] java.lang.RuntimeException: File: compiler\testData\codegen\box\regressions\kt344.kt
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:38) [exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:38)
[exec] at org.jetbrains.kotlin.android.tests.CodegenTestCaseOnAndroid.testKt344(CodegenTestCaseOnAndroid.java:595) [exec] at org.jetbrains.kotlin.android.tests.CodegenTestCaseOnAndroid.testKt344(CodegenTestCaseOnAndroid.java:595)
[exec] at java.lang.reflect.Method.invokeNative(Native Method) [exec] at java.lang.reflect.Method.invokeNative(Native Method)
@@ -114,9 +114,9 @@ public class CodegenTestsOnAndroidRunner {
[exec] at java.lang.reflect.Method.invokeNative(Native Method) [exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:35) [exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:35)
[exec] ... 13 more [exec] ... 13 more
[exec] Caused by: java.lang.VerifyError: compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage$t6$foo$1 [exec] Caused by: java.lang.VerifyError: compiler_testData_codegen_box_regressions_kt344_kt.Compiler_testData_codegen_box_regressions_kt344_ktPackage$t6$foo$1
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.t6(dummy.kt:94) [exec] at compiler_testData_codegen_box_regressions_kt344_kt.Compiler_testData_codegen_box_regressions_kt344_ktPackage.t6(dummy.kt:94)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.box(dummy.kt:185) [exec] at compiler_testData_codegen_box_regressions_kt344_kt.Compiler_testData_codegen_box_regressions_kt344_ktPackage.box(dummy.kt:185)
[exec] ... 16 more [exec] ... 16 more
[exec] ............... [exec] ...............
[exec] Error in testKt529: [exec] Error in testKt529:
@@ -106,7 +106,7 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
p.println("public class ", testClassName, " extends ", baseTestClassName, " {"); p.println("public class ", testClassName, " extends ", baseTestClassName, " {");
p.pushIndent(); p.pushIndent();
generateTestMethodsForDirectories(p, new File("compiler/testData/codegen/box"), new File("compiler/testData/codegen/boxWithStdlib")); generateTestMethodsForDirectories(p, new File("compiler/testData/codegen/box"));
p.popIndent(); p.popIndent();
p.println("}"); p.println("}");
@@ -218,14 +218,9 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
String packageName = file.getPath().replaceAll("\\\\|-|\\.|/", "_"); String packageName = file.getPath().replaceAll("\\\\|-|\\.|/", "_");
text = changePackage(packageName, text); text = changePackage(packageName, text);
if (!file.getCanonicalPath().contains("boxWithStdlib")) { // TODO: use holderMock when there's no WITH_RUNTIME or WITH_REFLECT in the test
CodegenTestFiles codegenFile = CodegenTestFiles.create(file.getName(), text, holderMock.environment.getProject()); CodegenTestFiles codegenFile = CodegenTestFiles.create(file.getName(), text, holderFull.environment.getProject());
holderMock.files.add(codegenFile.getPsiFile()); holderFull.files.add(codegenFile.getPsiFile());
}
else {
CodegenTestFiles codegenFile = CodegenTestFiles.create(file.getName(), text, holderFull.environment.getProject());
holderFull.files.add(codegenFile.getPsiFile());
}
generateTestMethod(printer, generatedTestName, StringUtil.escapeStringCharacters(file.getPath())); generateTestMethod(printer, generatedTestName, StringUtil.escapeStringCharacters(file.getPath()));
} }
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
abstract class A { abstract class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A(val result: String) class A(val result: String)
@@ -18,4 +18,4 @@ fun box():String {
val ref = ::A val ref = ::A
var result = ref(1).s + (::B)("23", "45").msg var result = ref(1).s + (::B)("23", "45").msg
return (if (result == "sA:init:12345") "OK" else result) return (if (result == "sA:init:12345") "OK" else result)
} }
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
class A class A
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A class A
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun <T> run(arg1: A, arg2: T, funRef:(A, T) -> T): T { fun <T> run(arg1: A, arg2: T, funRef:(A, T) -> T): T {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun run(arg1: A, funRef:A.() -> String): String { fun run(arg1: A, funRef:A.() -> String): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun run(arg1: A, arg2: String, funRef:A.(String) -> String): String { fun run(arg1: A, arg2: String, funRef:A.(String) -> String): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
class A { class A {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun run(arg1: A, arg2: String, funRef:A.(String) -> Unit): Unit { fun run(arg1: A, arg2: String, funRef:A.(String) -> Unit): Unit {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
class A class A
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun foo(until: Int): String { fun foo(until: Int): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
fun box(): String { fun box(): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun <T> run(arg1: T, arg2: T, funRef:(T,T) -> T): T { fun <T> run(arg1: T, arg2: T, funRef:(T,T) -> T): T {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun <T> run(arg1: T, arg2: T, funRef:(T,T) -> T): T { fun <T> run(arg1: T, arg2: T, funRef:(T,T) -> T): T {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun run(funRef:() -> String): String { fun run(funRef:() -> String): String {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun run(arg: Int, funRef:(Int) -> Int): Int { fun run(arg: Int, funRef:(Int) -> Int): Int {
@@ -17,4 +17,4 @@ fun box(): Boolean {
if (run(5, tmp()) != 6) return false if (run(5, tmp()) != 6) return false
return true return true
} }
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/.
package foo package foo
fun run(arg: Int, funRef:(Int) -> Int): Int { fun run(arg: Int, funRef:(Int) -> Int): Int {
@@ -15,4 +15,4 @@ fun box(): Boolean {
if (run(5) {x -> x + 1} != 6) return false if (run(5) {x -> x + 1} != 6) return false
return true return true
} }
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/function/local/. // This test was adapted from compiler/testData/codegen/box/callableReference/function/local/.
package foo package foo
var state = 23 var state = 23
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
abstract class Base { abstract class Base {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
import kotlin.reflect.KProperty import kotlin.reflect.KProperty
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
import kotlin.reflect.KProperty import kotlin.reflect.KProperty
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
import kotlin.reflect.KProperty1 import kotlin.reflect.KProperty1
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
open class Base { open class Base {
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
val String.id: String val String.id: String
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
class A(val x: Int) class A(val x: Int)
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
var storage = 0 var storage = 0
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
data class Box(var value: String) data class Box(var value: String)
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
data class Box(val value: String) data class Box(val value: String)
@@ -1,4 +1,4 @@
// This test was adapted from compiler/testData/codegen/boxWithStdlib/callableReference/property/. // This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo package foo
data class Box(val value: String) data class Box(val value: String)