Implement "proper numeric comparisons" support in JVM BE

This commit is contained in:
Dmitry Petrov
2018-02-08 09:50:22 +03:00
parent e23a48e8d0
commit a790195808
18 changed files with 652 additions and 138 deletions
@@ -10917,6 +10917,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("comparableToTWithTLV13.kt")
public void testComparableToTWithTLV13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableToTWithTLV13.kt");
doTest(fileName);
}
@TestMetadata("comparableTypeCast.kt")
public void testComparableTypeCast() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt");
@@ -11049,6 +11055,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("nullableDoubleEqualsLV13.kt")
public void testNullableDoubleEqualsLV13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt");
doTest(fileName);
}
@TestMetadata("nullableDoubleNotEquals.kt")
public void testNullableDoubleNotEquals() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt");
@@ -11103,6 +11115,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("smartCastOnWhenSubjectAfterCheckInBranchLV13.kt")
public void testSmartCastOnWhenSubjectAfterCheckInBranchLV13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranchLV13.kt");
doTest(fileName);
}
@TestMetadata("smartCastToDifferentTypes.kt")
public void testSmartCastToDifferentTypes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt");
@@ -11115,6 +11133,24 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("smartCastToDifferentTypesLV13.kt")
public void testSmartCastToDifferentTypesLV13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesLV13.kt");
doTest(fileName);
}
@TestMetadata("smartCastToDifferentTypesWithNumericPromotionLV13.kt")
public void testSmartCastToDifferentTypesWithNumericPromotionLV13() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotionLV13.kt");
try {
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
@TestMetadata("when.kt")
public void testWhen() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when.kt");