JVM box tests for KT-30548

This commit is contained in:
Dmitry Petrov
2020-12-24 12:12:34 +03:00
parent daa6255ab7
commit a1574bf50a
9 changed files with 61 additions and 0 deletions
@@ -21790,6 +21790,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -0,0 +1,21 @@
// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
// IGNORE_BACKEND: JVM
class Test {
companion object {
private lateinit var INSTANCE: String
fun foo() {
INSTANCE
}
}
}
fun box(): String {
try {
Test.foo()
return "'Test.foo()' should throw"
} catch (e: Exception) {
return "OK"
}
}
@@ -22156,6 +22156,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -22156,6 +22156,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -21790,6 +21790,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -17866,6 +17866,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -17866,6 +17866,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -17956,6 +17956,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt");
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/localClass.kt");
@@ -11312,6 +11312,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("kt30548.kt")
public void testKt30548() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/kt30548.kt");
}
@TestMetadata("nameClash.kt")
public void testNameClash() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/nameClash.kt");