Add boolean literals diagnostic spec tests

This commit is contained in:
victor.petukhov
2018-10-31 13:07:22 +03:00
parent 1af1eed31c
commit 73ecde6cc3
7 changed files with 142 additions and 0 deletions
@@ -53,6 +53,73 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Boolean_literals extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInBoolean_literals() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
@TestMetadata("3.1.kt")
public void test3_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
@TestMetadata("3.1.kt")
public void test3_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.kt");
}
@TestMetadata("3.2.kt")
public void test3_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)