Add more tests for -Xassertions=jvm corner cases
This commit is contained in:
committed by
max-kammerer
parent
3e25166832
commit
d11344ce2e
+40
@@ -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");
|
||||
|
||||
@@ -433,6 +433,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
public void testJvmInlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmNestedClass.kt")
|
||||
public void testJvmNestedClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmNestedClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/boxing")
|
||||
|
||||
+40
@@ -842,6 +842,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Jvm extends AbstractLightAnalysisModeTest {
|
||||
@TestMetadata("classAssertionsForInnerClasses.kt")
|
||||
public void ignoreClassAssertionsForInnerClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForInnerClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAssertionsForLocalClasses.kt")
|
||||
public void ignoreClassAssertionsForLocalClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForLocalClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("classAssertionsForNestedClasses.kt")
|
||||
public void ignoreClassAssertionsForNestedClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/assert/jvm/classAssertionsForNestedClasses.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
@@ -854,6 +869,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
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("interfaceAssertionsDisabled.kt")
|
||||
public void testInterfaceAssertionsDisabled() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/assert/jvm/interfaceAssertionsDisabled.kt");
|
||||
@@ -864,6 +894,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
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 LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
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");
|
||||
|
||||
+40
@@ -854,6 +854,36 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, 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 IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
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 IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
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");
|
||||
|
||||
+5
@@ -433,6 +433,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
||||
public void testJvmInlineLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmInlineLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmNestedClass.kt")
|
||||
public void testJvmNestedClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/assert/jvmNestedClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/boxing")
|
||||
|
||||
Reference in New Issue
Block a user