Support equals/hashCode for fun interfaces in JVM and JVM_IR
#KT-33455 Fixed
This commit is contained in:
committed by
Alexander Udalov
parent
de461dd9a5
commit
9fa8e009c6
Generated
+51
@@ -9551,6 +9551,44 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
public void testSuspendFunInterfaceConversionCodegen() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/suspendFunInterfaceConversionCodegen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/funInterface/equality")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equality extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquality() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("functionReferencesBound.kt")
|
||||
public void testFunctionReferencesBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/functionReferencesBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionReferencesUnbound.kt")
|
||||
public void testFunctionReferencesUnbound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/functionReferencesUnbound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaRuntimeConversion.kt")
|
||||
public void testLambdaRuntimeConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/lambdaRuntimeConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionReferences.kt")
|
||||
public void testLocalFunctionReferences() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/localFunctionReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleLambdas.kt")
|
||||
public void testSimpleLambdas() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/simpleLambdas.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/functions")
|
||||
@@ -21573,6 +21611,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/sam/equality")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equality extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquality() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/sealed")
|
||||
|
||||
+51
@@ -9551,6 +9551,44 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
public void testSuspendFunInterfaceConversionCodegen() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/suspendFunInterfaceConversionCodegen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/funInterface/equality")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equality extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquality() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("functionReferencesBound.kt")
|
||||
public void testFunctionReferencesBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/functionReferencesBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionReferencesUnbound.kt")
|
||||
public void testFunctionReferencesUnbound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/functionReferencesUnbound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaRuntimeConversion.kt")
|
||||
public void testLambdaRuntimeConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/lambdaRuntimeConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionReferences.kt")
|
||||
public void testLocalFunctionReferences() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/localFunctionReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleLambdas.kt")
|
||||
public void testSimpleLambdas() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/equality/simpleLambdas.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/functions")
|
||||
@@ -21633,6 +21671,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/sam/equality")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Equality extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInEquality() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/sealed")
|
||||
|
||||
Reference in New Issue
Block a user