From 8b83cb2adf640a7c2d7858199fa3ba4840c288da Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Wed, 11 Jan 2017 15:20:07 +0700 Subject: [PATCH] backend: enable some tests --- backend.native/tests/build.gradle | 2 -- backend.native/tests/codegen/basics/array_to_any.kt | 2 +- backend.native/tests/runtime/collections/hash_map0.kt | 7 +++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index cc6eb766176..db71cc70b4c 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -195,7 +195,6 @@ task null_check(type: RunKonanTest) { } task array_to_any(type: RunKonanTest) { - disabled = true source = "codegen/basics/array_to_any.kt" } @@ -386,7 +385,6 @@ task statements0(type: RunKonanTest) { } task boxing0(type: RunKonanTest) { - disabled = true goldValue = "17\n" source = "codegen/boxing/boxing0.kt" } diff --git a/backend.native/tests/codegen/basics/array_to_any.kt b/backend.native/tests/codegen/basics/array_to_any.kt index 4961fee3d9e..43bf2de6cfc 100644 --- a/backend.native/tests/codegen/basics/array_to_any.kt +++ b/backend.native/tests/codegen/basics/array_to_any.kt @@ -1,5 +1,5 @@ fun main(args: Array) { - println(foo().toString()) + foo().hashCode() } fun foo(): Any { diff --git a/backend.native/tests/runtime/collections/hash_map0.kt b/backend.native/tests/runtime/collections/hash_map0.kt index 426c2c15a30..37f3656b950 100644 --- a/backend.native/tests/runtime/collections/hash_map0.kt +++ b/backend.native/tests/runtime/collections/hash_map0.kt @@ -181,7 +181,6 @@ fun testPutEntry() { assertTrue(expected == m) } -/* Fails due to variance. fun testRemoveAllEntries() { val expected = mapOf("a" to "1", "b" to "2", "c" to "3") val m = HashMap(expected) @@ -199,7 +198,7 @@ fun testRetainAllEntries() { assertEquals(expected, m) assertTrue(m.entries.retainAll(mapOf("b" to "22", "c" to "3", "d" to "4").entries)) assertEquals(mapOf("c" to "3"), m) -} */ +} fun testContainsAllValues() { val m = HashMap(mapOf("a" to "1", "b" to "2", "c" to "3")) @@ -256,8 +255,8 @@ fun main(args : Array) { testHashCode() testToString() testPutEntry() - //testRemoveAllEntries() - //testRetainAllEntries() + testRemoveAllEntries() + testRetainAllEntries() testContainsAllValues() testRemoveValue() testRemoveAllValues()