File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
de.peeeq.wurstscript/src/test/java/tests/wurstscript/tests Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1539,5 +1539,33 @@ public void overloadsHiddenBySubclassName_onlyZeroArgSeen_errorsOnArgs() {
15391539 );
15401540 }
15411541
1542+ @ Test
1543+ public void iteratorManualType () {
1544+ testAssertOkLinesWithStdLib (true ,
1545+ "package test" ,
1546+ "import Printing" ,
1547+ "import LinkedListModule" ,
1548+ "class A" ,
1549+ " use LinkedListModule" ,
1550+ " string s" ,
1551+ "init" ,
1552+ " A a1 = new A()" ,
1553+ " a1.s = \" hello\" " ,
1554+ " A a2 = new A()" ,
1555+ " a2.s = \" world\" " ,
1556+ " int itrCount = 0" ,
1557+ " let itr = A.iterator()" ,
1558+ " while itr.hasNext()" ,
1559+ " let a = itr.next()" ,
1560+ " itrCount += 1" ,
1561+ " print(a.s)" ,
1562+ " itr.close()" ,
1563+ " if itrCount == 2" ,
1564+ " testSuccess()" ,
1565+ "endpackage"
1566+
1567+ );
1568+ }
1569+
15421570
15431571}
You can’t perform that action at this time.
0 commit comments