diff --git a/testlib/test/StandardCollectionTest.kt b/testlib/test/StandardCollectionTest.kt new file mode 100644 index 00000000000..42c6a83d01e --- /dev/null +++ b/testlib/test/StandardCollectionTest.kt @@ -0,0 +1,20 @@ +package test.collections + +import std.* +import std.test.* + +class StandardCollectionTest() : TestSupport() { + + fun testAny() { + // TODO is a cast really required? + // doesn't compile without it, see KT-924 + val data: Iterable = std.util.arrayList("foo", "bar") as Iterable + + assert { + data.any{it.startsWith("f")} + } + assertNot { + data.any{it.startsWith("x")} + } + } +} \ No newline at end of file diff --git a/testlib/test/test/collections/TestAll.java b/testlib/test/test/collections/TestAll.java index 6003899551e..7e2c67bbe7b 100644 --- a/testlib/test/test/collections/TestAll.java +++ b/testlib/test/test/collections/TestAll.java @@ -6,7 +6,7 @@ import junit.framework.TestSuite; */ public class TestAll { public static TestSuite suite() { - TestSuite suite = new TestSuite(CollectionTest.class, IoTest.class, ListTest.class, MapTest.class, SetTest.class, OldStdlibTest.class); + TestSuite suite = new TestSuite(StandardCollectionTest.class, CollectionTest.class, IoTest.class, ListTest.class, MapTest.class, SetTest.class, OldStdlibTest.class); suite.addTest(testDslExample.namespace.getSuite()); return suite; }