From 7f4bc1a121a4d6b813695a290da229b38a1063ed Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 29 Feb 2012 09:51:38 +0000 Subject: [PATCH] split the filter method into filter(predicate) and filterTo(result, predicate) for easier completion & avoid confusion - seems 2 methods is better than the default arguments approach --- testlib/test/CollectionTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testlib/test/CollectionTest.kt b/testlib/test/CollectionTest.kt index c3867ae94a1..d6427678b56 100644 --- a/testlib/test/CollectionTest.kt +++ b/testlib/test/CollectionTest.kt @@ -67,7 +67,7 @@ class CollectionTest() : TestSupport() { fun testFilterIntoLinkedList() { // TODO would be nice to avoid the - val foo = data.filter(linkedList()){it.startsWith("f")} + val foo = data.filterTo(linkedList()){it.startsWith("f")} assertTrue { foo.all{it.startsWith("f")} @@ -82,7 +82,7 @@ class CollectionTest() : TestSupport() { fun testFilterIntoSortedSet() { // TODO would be nice to avoid the - val foo = data.filter(hashSet()){it.startsWith("f")} + val foo = data.filterTo(hashSet()){it.startsWith("f")} assertTrue { foo.all{it.startsWith("f")}