diff --git a/compiler/testData/codegen/inputStreamIterator.jet b/compiler/testData/codegen/inputStreamIterator.jet deleted file mode 100644 index 85ff66b2ba7..00000000000 --- a/compiler/testData/codegen/inputStreamIterator.jet +++ /dev/null @@ -1,18 +0,0 @@ -import std.* -import std.io.* - -import java.io.* - -fun box() : String { - val x = ByteArray (10) - - for(index in 0..9) { - x [index] = index.byt - } - - for(b in x.inputStream) { - System.out?.println(b) - } - - return "OK" -} diff --git a/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java b/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java index 50e8f8b2e20..f16bdf4617b 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/StdlibTest.java @@ -50,11 +50,6 @@ public class StdlibTest extends CodegenTestCase { } } - public void testInputStreamIterator () { - blackBoxFile("inputStreamIterator.jet"); -// System.out.println(generateToText()); - } - public void testKt533 () { blackBoxFile("regressions/kt533.kt"); } @@ -74,16 +69,4 @@ public class StdlibTest extends CodegenTestCase { public void testKt828 () { blackBoxFile("regressions/kt828.kt"); } - - public void testCollectionSize () throws Exception { - loadText("import std.util.*; fun box() = if(java.util.Arrays.asList(0, 1, 2)?.size == 3) \"OK\" else \"fail\""); -// System.out.println(generateToText()); - blackBox(); - } - - public void testCollectionEmpty () throws Exception { - loadText("import std.util.*; fun box() = if(java.util.Arrays.asList(0, 1, 2)?.empty ?: false) \"OK\" else \"fail\""); -// System.out.println(generateToText()); - blackBox(); - } } diff --git a/testlib/test/OldStdlibTest.kt b/testlib/test/OldStdlibTest.kt new file mode 100644 index 00000000000..edafe9745e2 --- /dev/null +++ b/testlib/test/OldStdlibTest.kt @@ -0,0 +1,34 @@ +package test.collections + +import std.* +import std.io.* +import std.util.* +import std.test.* +import java.util.* +import java.io.* + +class OldStdlibTest() : TestSupport() { + fun testCollectionEmpty() { + assert { + Arrays.asList(0, 1, 2)?.empty ?: false + } + } + + fun testCollectionSize() { + assert { + Arrays.asList(0, 1, 2)?.size == 3 + } + } + + fun testInputStreamIterator() { + val x = ByteArray (10) + + for(index in 0..9) { + x [index] = index.byt + } + + for(b in x.inputStream) { + System.out?.println(b) + } + } +} diff --git a/testlib/test/test/collections/TestAll.java b/testlib/test/test/collections/TestAll.java index 7d465c5b03e..6003899551e 100644 --- a/testlib/test/test/collections/TestAll.java +++ b/testlib/test/test/collections/TestAll.java @@ -6,8 +6,8 @@ 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); + TestSuite suite = new TestSuite(CollectionTest.class, IoTest.class, ListTest.class, MapTest.class, SetTest.class, OldStdlibTest.class); suite.addTest(testDslExample.namespace.getSuite()); return suite; } -} \ No newline at end of file +}