Generate optimized hashCode for primitive type with jvmTarget 1.8+

#KT-7571 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-06-27 14:09:26 +02:00
parent d7e4350d42
commit 69457ef3f1
15 changed files with 293 additions and 29 deletions
@@ -1308,6 +1308,21 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/hashCode")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class HashCode extends AbstractBytecodeTextTest {
public void testAllFilesPresentInHashCode() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("hashCode.kt")
public void testHashCode() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/ieee754")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)