1 ! (c)2011 Joe Groff bsd license
2 USING: alien.data destructors io io.streams.memory kernel libc
4 IN: io.streams.memory.tests
7 B{ 1 2 3 } <memory-stream>
8 [ stream-read1 ] [ stream-read1 ] [ stream-read1 ] tri
13 B{ 1 2 3 } malloc-byte-array &free <memory-stream>
14 [ stream-read1 ] [ stream-read1 ] [ stream-read1 ] tri
18 { B{ 1 2 3 } B{ 4 5 6 7 8 } } [
19 B{ 1 2 3 4 5 6 7 8 } <memory-stream>
20 [ 3 swap stream-read ] [ 5 swap stream-read ] bi
23 { B{ 1 2 3 } B{ 4 5 6 7 8 } } [
25 B{ 1 2 3 4 5 6 7 8 } malloc-byte-array &free <memory-stream>
26 [ 3 swap stream-read ] [ 5 swap stream-read ] bi