Split GenerateNotNullAssertionsTests into standard box and bytecode tests

This commit is contained in:
Steven Schäfer
2019-07-02 10:07:37 +02:00
committed by Alexander Udalov
parent dfd0042a5b
commit dd20b74030
33 changed files with 668 additions and 360 deletions
@@ -3073,6 +3073,69 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/notNullAssertions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NotNullAssertions extends AbstractBytecodeTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInNotNullAssertions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("arrayListGet.kt")
public void testArrayListGet() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/arrayListGet.kt");
}
@TestMetadata("assertionForNotNullCaptured.kt")
public void testAssertionForNotNullCaptured() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/assertionForNotNullCaptured.kt");
}
@TestMetadata("assertionForNotNullTypeParam.kt")
public void testAssertionForNotNullTypeParam() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/assertionForNotNullTypeParam.kt");
}
@TestMetadata("doNotGenerateParamAssertions.kt")
public void testDoNotGenerateParamAssertions() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/doNotGenerateParamAssertions.kt");
}
@TestMetadata("javaMultipleSubstitutions.kt")
public void testJavaMultipleSubstitutions() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/javaMultipleSubstitutions.kt");
}
@TestMetadata("noAssertionForNullableCaptured.kt")
public void testNoAssertionForNullableCaptured() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/noAssertionForNullableCaptured.kt");
}
@TestMetadata("noAssertionForNullableGenericMethod.kt")
public void testNoAssertionForNullableGenericMethod() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/noAssertionForNullableGenericMethod.kt");
}
@TestMetadata("noAssertionForNullableGenericMethodCall.kt")
public void testNoAssertionForNullableGenericMethodCall() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/noAssertionForNullableGenericMethodCall.kt");
}
@TestMetadata("noAssertionForPrivateMethod.kt")
public void testNoAssertionForPrivateMethod() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/noAssertionForPrivateMethod.kt");
}
@TestMetadata("noAssertionsForKotlin.kt")
public void testNoAssertionsForKotlin() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/notNullAssertions/noAssertionsForKotlin.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)