From 944c5b604446e57a91ec6f38a17e2c07d6ebfd0d Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Thu, 16 Aug 2018 13:38:47 +0300 Subject: [PATCH] JS: modify a test to work around Kotlin/JS Double.toString problems --- .../defaultFunctionsFromAnyForInlineClass.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt index ea01e558527..e3199f95999 100644 --- a/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND: JVM_IR, JS_IR, JS +// IGNORE_BACKEND: JVM_IR, JS_IR inline class Foo(val x: Int) inline class FooRef(val y: String) @@ -37,15 +37,15 @@ fun box(): String { if (42L.hashCode() != fLong.hashCode()) return "Fail 12" - val fDouble = FooDouble(42.0) - if (fDouble.toString() != "FooDouble(y=42.0)") return "Fail 13: $fDouble" + val fDouble = FooDouble(42.1) + if (fDouble.toString() != "FooDouble(y=42.1)") return "Fail 13: $fDouble" if (!fDouble.equals(fDouble)) return "Fail 14" val gDouble = FooDouble(43.0) if (fDouble.equals(gDouble)) return "Fail 15" - if (42.0.hashCode() != fDouble.hashCode()) return "Fail 16" + if (42.1.hashCode() != fDouble.hashCode()) return "Fail 16" return "OK" } \ No newline at end of file