forked from Mirror/wren
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
12 lines
247 B
Plaintext
12 lines
247 B
Plaintext
class TestSequence is Sequence {
|
|
iterate(iterator) {
|
|
if (iterator == null) return 1
|
|
if (iterator == 10) return false
|
|
return iterator + 1
|
|
}
|
|
|
|
iteratorValue(iterator) { iterator }
|
|
}
|
|
|
|
IO.print((new TestSequence).count) // expect: 10
|