Migrate boxWithJava tests to multi-file framework

This commit is contained in:
Alexander Udalov
2016-03-01 19:18:37 +03:00
parent 0801ae5364
commit 2de7f38427
266 changed files with 2271 additions and 1729 deletions
@@ -27,88 +27,86 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/java8/boxWithJava")
@TestMetadata("compiler/testData/codegen/java8/box")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInBoxWithJava() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/boxWithJava"), Pattern.compile("^([^\\.]+)$"), true);
public void testAllFilesPresentInBox() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("defaultMethodCallFromTrait")
public void testDefaultMethodCallFromTrait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallFromTrait/");
doTestWithJava(fileName);
@TestMetadata("defaultMethodCallFromInterface.kt")
public void testDefaultMethodCallFromInterface() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodCallFromInterface.kt");
doTest(fileName);
}
@TestMetadata("defaultMethodCallViaClass")
@TestMetadata("defaultMethodCallViaClass.kt")
public void testDefaultMethodCallViaClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaClass/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodCallViaClass.kt");
doTest(fileName);
}
@TestMetadata("defaultMethodCallViaTrait")
public void testDefaultMethodCallViaTrait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/");
doTestWithJava(fileName);
@TestMetadata("defaultMethodCallViaInterface.kt")
public void testDefaultMethodCallViaInterface() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodCallViaInterface.kt");
doTest(fileName);
}
@TestMetadata("defaultMethodOverride")
@TestMetadata("defaultMethodOverride.kt")
public void testDefaultMethodOverride() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodOverride/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodOverride.kt");
doTest(fileName);
}
@TestMetadata("dontDelegateToDefaultMethods")
@TestMetadata("dontDelegateToDefaultMethods.kt")
public void testDontDelegateToDefaultMethods() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/dontDelegateToDefaultMethods/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/dontDelegateToDefaultMethods.kt");
doTest(fileName);
}
@TestMetadata("inheritKotlin")
@TestMetadata("inheritKotlin.kt")
public void testInheritKotlin() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/inheritKotlin/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/inheritKotlin.kt");
doTest(fileName);
}
@TestMetadata("invokeDefaultViaSuper")
@TestMetadata("invokeDefaultViaSuper.kt")
public void testInvokeDefaultViaSuper() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/invokeDefaultViaSuper/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt");
doTest(fileName);
}
@TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault")
@TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault.kt")
public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/longChainOfKotlinExtendsFromJavaWithDefault/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt");
doTest(fileName);
}
@TestMetadata("samOnInterfaceWithDefaultMethod")
@TestMetadata("samOnInterfaceWithDefaultMethod.kt")
public void testSamOnInterfaceWithDefaultMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/samOnInterfaceWithDefaultMethod/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/samOnInterfaceWithDefaultMethod.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/codegen/java8/boxWithJava/reflection")
@TestMetadata("compiler/testData/codegen/java8/box/reflection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Reflection extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInReflection() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/reflection"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("realParameterNames")
@TestMetadata("realParameterNames.kt")
public void testRealParameterNames() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/reflection/realParameterNames/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/reflection/realParameterNames.kt");
doTest(fileName);
}
@TestMetadata("synthesizedParameterNames")
@TestMetadata("synthesizedParameterNames.kt")
public void testSynthesizedParameterNames() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/reflection/synthesizedParameterNames/");
doTestWithJava(fileName);
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/reflection/synthesizedParameterNames.kt");
doTest(fileName);
}
}
}