K2: Added test for data class metadata
#KT-57622 Fixed
This commit is contained in:
committed by
Space Team
parent
f48142a6e6
commit
f67f8c393b
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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"
|
||||
}
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user