Support equals/hashCode for fun interfaces in JVM and JVM_IR

#KT-33455 Fixed
This commit is contained in:
Alexander Udalov
2020-03-23 11:23:49 +01:00
committed by Alexander Udalov
parent de461dd9a5
commit 9fa8e009c6
25 changed files with 1036 additions and 23 deletions
@@ -12356,6 +12356,44 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
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 AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInEquality() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, 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")
@@ -28283,6 +28321,44 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/sam/equality")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Equality extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInEquality() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("functionReferencesBound.kt")
public void testFunctionReferencesBound() throws Exception {
runTest("compiler/testData/codegen/box/sam/equality/functionReferencesBound.kt");
}
@TestMetadata("functionReferencesUnbound.kt")
public void testFunctionReferencesUnbound() throws Exception {
runTest("compiler/testData/codegen/box/sam/equality/functionReferencesUnbound.kt");
}
@TestMetadata("lambdaRuntimeConversion.kt")
public void testLambdaRuntimeConversion() throws Exception {
runTest("compiler/testData/codegen/box/sam/equality/lambdaRuntimeConversion.kt");
}
@TestMetadata("localFunctionReferences.kt")
public void testLocalFunctionReferences() throws Exception {
runTest("compiler/testData/codegen/box/sam/equality/localFunctionReferences.kt");
}
@TestMetadata("simpleLambdas.kt")
public void testSimpleLambdas() throws Exception {
runTest("compiler/testData/codegen/box/sam/equality/simpleLambdas.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/sealed")