added an attempt to use the standard APIs on kotlin.Iterable
This commit is contained in:
@@ -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<String> = std.util.arrayList("foo", "bar") as Iterable<String>
|
||||
|
||||
assert {
|
||||
data.any{it.startsWith("f")}
|
||||
}
|
||||
assertNot {
|
||||
data.any{it.startsWith("x")}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user