Introduce Experimental and UseExperimental annotations

#KT-22759 In Progress
This commit is contained in:
Alexander Udalov
2017-12-12 14:18:42 +01:00
parent 366f630236
commit 0bf0a315ed
31 changed files with 1551 additions and 12 deletions
@@ -1795,6 +1795,75 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Experimental extends AbstractDiagnosticsTestWithStdLib {
public void testAllFilesPresentInExperimental() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/experimental"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("annotation.kt")
public void testAnnotation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt");
doTest(fileName);
}
@TestMetadata("bodyUsages.kt")
public void testBodyUsages() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt");
doTest(fileName);
}
@TestMetadata("classMembers.kt")
public void testClassMembers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt");
doTest(fileName);
}
@TestMetadata("classMembersOverlyExperimental.kt")
public void testClassMembersOverlyExperimental() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt");
doTest(fileName);
}
@TestMetadata("compilationVsLinkageVsRuntime.kt")
public void testCompilationVsLinkageVsRuntime() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/compilationVsLinkageVsRuntime.kt");
doTest(fileName);
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt");
doTest(fileName);
}
@TestMetadata("typealias.kt")
public void testTypealias() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt");
doTest(fileName);
}
@TestMetadata("useExperimentalOnFile.kt")
public void testUseExperimentalOnFile() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt");
doTest(fileName);
}
@TestMetadata("useExperimentalTargets.kt")
public void testUseExperimentalTargets() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalTargets.kt");
doTest(fileName);
}
@TestMetadata("useExperimentalWithSeveralAnnotations.kt")
public void testUseExperimentalWithSeveralAnnotations() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1795,6 +1795,75 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Experimental extends AbstractDiagnosticsTestWithStdLibUsingJavac {
public void testAllFilesPresentInExperimental() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/experimental"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("annotation.kt")
public void testAnnotation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt");
doTest(fileName);
}
@TestMetadata("bodyUsages.kt")
public void testBodyUsages() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt");
doTest(fileName);
}
@TestMetadata("classMembers.kt")
public void testClassMembers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt");
doTest(fileName);
}
@TestMetadata("classMembersOverlyExperimental.kt")
public void testClassMembersOverlyExperimental() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt");
doTest(fileName);
}
@TestMetadata("compilationVsLinkageVsRuntime.kt")
public void testCompilationVsLinkageVsRuntime() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/compilationVsLinkageVsRuntime.kt");
doTest(fileName);
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt");
doTest(fileName);
}
@TestMetadata("typealias.kt")
public void testTypealias() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt");
doTest(fileName);
}
@TestMetadata("useExperimentalOnFile.kt")
public void testUseExperimentalOnFile() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt");
doTest(fileName);
}
@TestMetadata("useExperimentalTargets.kt")
public void testUseExperimentalTargets() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalTargets.kt");
doTest(fileName);
}
@TestMetadata("useExperimentalWithSeveralAnnotations.kt")
public void testUseExperimentalWithSeveralAnnotations() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)