K2: Added test for data class metadata

#KT-57622 Fixed
This commit is contained in:
Pavel Kunyavskiy
2023-04-18 14:36:46 +02:00
committed by Space Team
parent f48142a6e6
commit f67f8c393b
20 changed files with 146 additions and 0 deletions
@@ -13745,6 +13745,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt");
}
@Test
@TestMetadata("fromOtherModule.kt")
public void testFromOtherModule() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/fromOtherModule.kt");
}
@Test
@TestMetadata("genericParam.kt")
public void testGenericParam() throws Exception {
@@ -13745,6 +13745,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt");
}
@Test
@TestMetadata("fromOtherModule.kt")
public void testFromOtherModule() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/fromOtherModule.kt");
}
@Test
@TestMetadata("genericParam.kt")
public void testGenericParam() throws Exception {
@@ -0,0 +1,19 @@
// MODULE: lib
// FILE: lib.kt
data class D(val x: Int)
// MODULE: main(lib)
// FILE: main.kt
fun box() : String {
val a = D(1)
val b = D(2)
val c = D(1)
if (a == b) return "FAIL 1"
if (a != c) return "FAIL 2"
if (!a.equals(c)) return "FAIL 3"
if (a.hashCode() != c.hashCode()) return "FAIL 4"
return "OK"
}
@@ -13421,6 +13421,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt");
}
@Test
@TestMetadata("fromOtherModule.kt")
public void testFromOtherModule() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/fromOtherModule.kt");
}
@Test
@TestMetadata("genericParam.kt")
public void testGenericParam() throws Exception {
@@ -13745,6 +13745,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt");
}
@Test
@TestMetadata("fromOtherModule.kt")
public void testFromOtherModule() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/fromOtherModule.kt");
}
@Test
@TestMetadata("genericParam.kt")
public void testGenericParam() throws Exception {
@@ -13745,6 +13745,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt");
}
@Test
@TestMetadata("fromOtherModule.kt")
public void testFromOtherModule() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/fromOtherModule.kt");
}
@Test
@TestMetadata("genericParam.kt")
public void testGenericParam() throws Exception {
@@ -10901,6 +10901,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt");
}
@TestMetadata("fromOtherModule.kt")
public void testFromOtherModule() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/fromOtherModule.kt");
}
@TestMetadata("genericParam.kt")
public void testGenericParam() throws Exception {
runTest("compiler/testData/codegen/box/dataClasses/genericParam.kt");