Fix comparison of boolean values in JS BE

See KT-16984
This commit is contained in:
Alexey Andreev
2017-05-25 16:48:08 +03:00
parent f5510b8d66
commit dde50a34db
8 changed files with 42 additions and 18 deletions
@@ -1882,6 +1882,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/compareTo"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("booleanCompareTo.kt")
public void testBooleanCompareTo() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/compareTo/booleanCompareTo.kt");
doTest(fileName);
}
@TestMetadata("customCompareToMethod.kt")
public void testCustomCompareToMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/compareTo/customCompareToMethod.kt");
@@ -13222,13 +13222,7 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("boolean.kt")
public void testBoolean() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt");
try {
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
doTest(fileName);
}
@TestMetadata("comparable.kt")