Skip to content

Commit f3afb0f

Browse files
committed
Update BugTests.java
1 parent 76c4fc9 commit f3afb0f

File tree

1 file changed

+28
-0
lines changed
  • de.peeeq.wurstscript/src/test/java/tests/wurstscript/tests

1 file changed

+28
-0
lines changed

de.peeeq.wurstscript/src/test/java/tests/wurstscript/tests/BugTests.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)