Add more tests for -Xassertions=jvm corner cases

This commit is contained in:
Steven Schäfer
2019-07-05 15:24:54 +02:00
committed by max-kammerer
parent 3e25166832
commit d11344ce2e
15 changed files with 491 additions and 1 deletions
@@ -854,6 +854,36 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("assertionsEnabledBeforeClassInitializers.kt")
public void testAssertionsEnabledBeforeClassInitializers() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/assertionsEnabledBeforeClassInitializers.kt");
}
@TestMetadata("classAssertions.kt")
public void testClassAssertions() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/classAssertions.kt");
}
@TestMetadata("classAssertionsForCompanion.kt")
public void testClassAssertionsForCompanion() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForCompanion.kt");
}
@TestMetadata("classAssertionsForInnerClasses.kt")
public void testClassAssertionsForInnerClasses() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForInnerClasses.kt");
}
@TestMetadata("classAssertionsForLocalClasses.kt")
public void testClassAssertionsForLocalClasses() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForLocalClasses.kt");
}
@TestMetadata("classAssertionsForNestedClasses.kt")
public void testClassAssertionsForNestedClasses() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForNestedClasses.kt");
}
@TestMetadata("interfaceAssertionsDisabled.kt")
public void testInterfaceAssertionsDisabled() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/interfaceAssertionsDisabled.kt");
@@ -864,6 +894,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/assert/jvm/interfaceAssertionsEnabled.kt");
}
@TestMetadata("lambdaNotEvaluated.kt")
public void testLambdaNotEvaluated() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/lambdaNotEvaluated.kt");
}
@TestMetadata("localAnonymousFunction.kt")
public void testLocalAnonymousFunction() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/localAnonymousFunction.kt");
@@ -889,6 +924,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/assert/jvm/localObject.kt");
}
@TestMetadata("noUnnecessaryClassInitialization.kt")
public void testNoUnnecessaryClassInitialization() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/noUnnecessaryClassInitialization.kt");
}
@TestMetadata("nonLocalReturn.kt")
public void testNonLocalReturn() throws Exception {
runTest("compiler/testData/codegen/box/assert/jvm/nonLocalReturn.kt");