[box-tests] Added a multi-module test on lateinit properties

This commit is contained in:
Igor Chevdar
2022-07-12 15:41:27 +03:00
committed by Space
parent 8041692144
commit 6799988227
9 changed files with 64 additions and 0 deletions
@@ -35200,6 +35200,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@Test
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@Nested
@@ -0,0 +1,18 @@
// WITH_STDLIB
// MODULE: lib
// FILE: lib.kt
package lib
lateinit var bar: String
// MODULE: main(lib)
// FILE: box.kt
import lib.*
fun box(): String {
if (::bar.isInitialized) return "Fail 1"
bar = "OK"
if (!::bar.isInitialized) return "Fail 2"
return bar
}
@@ -34582,6 +34582,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@Test
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@Nested
@@ -35200,6 +35200,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@Test
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@Nested
@@ -29506,6 +29506,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/properties/lateinit/local")
@@ -25434,6 +25434,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@Test
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@Nested
@@ -25428,6 +25428,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@Test
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@Nested
@@ -22689,6 +22689,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/properties/lateinit/local")
@@ -28241,6 +28241,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
public void testTopLevelProperty() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt");
}
@Test
@TestMetadata("topLevelPropertyMultiModule.kt")
public void testTopLevelPropertyMultiModule() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelPropertyMultiModule.kt");
}
}
@Nested