1 testing UnitTests define: #Stream &parents: {TestCase}.
2 "Unit tests for Stream semantics."
4 "---------------------------------------------------------------------------"
5 "The build... methods can be overridden in subinstances to allow
6 testing of different kinds of stream. The tests in the base stream
7 class exercise just the common stream protocols."
9 tc@(UnitTests Stream traits) buildEmptyReader
12 tc@(UnitTests Stream traits) buildReader
15 tc@(UnitTests Stream traits) expectedReaderFirstElement
18 tc@(UnitTests Stream traits) testExhaustionOnEmptyReader
19 [tc should: ['' reader next] raise: Stream Exhaustion].
21 tc@(UnitTests Stream traits) testReaderFirstElement
22 [tc assert: (tc buildReader next = tc expectedReaderFirstElement)].
24 tc@(UnitTests Stream traits) suite
25 [tc suiteForSelectors: {
26 #testExhaustionOnEmptyReader.
27 #testReaderFirstElement.