[box-tests] Added a multi-module test on lateinit properties
This commit is contained in:
+6
@@ -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
|
||||
|
||||
+18
@@ -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
|
||||
}
|
||||
+6
@@ -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
|
||||
|
||||
+6
@@ -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
|
||||
|
||||
+5
@@ -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")
|
||||
|
||||
+6
@@ -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
|
||||
|
||||
+6
@@ -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
|
||||
|
||||
+5
@@ -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")
|
||||
|
||||
+6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user