1 ! Copyright (C) 2011 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.data destructors io io.streams.memory kernel libc
5 IN: io.streams.memory.tests
8 B{ 1 2 3 } <memory-stream>
9 [ stream-read1 ] [ stream-read1 ] [ stream-read1 ] tri
14 B{ 1 2 3 } malloc-byte-array &free <memory-stream>
15 [ stream-read1 ] [ stream-read1 ] [ stream-read1 ] tri
19 { B{ 1 2 3 } B{ 4 5 6 7 8 } } [
20 B{ 1 2 3 4 5 6 7 8 } <memory-stream>
21 [ 3 swap stream-read ] [ 5 swap stream-read ] bi
24 { B{ 1 2 3 } B{ 4 5 6 7 8 } } [
26 B{ 1 2 3 4 5 6 7 8 } malloc-byte-array &free <memory-stream>
27 [ 3 swap stream-read ] [ 5 swap stream-read ] bi