1 USING: tools.test io.files io.files.temp io io.streams.c
2 io.encodings.ascii strings destructors kernel specialized-arrays
3 alien.c-types math alien.data ;
8 "hello world" "test.txt" temp-file ascii set-file-contents
10 "test.txt" temp-file "rb" fopen <c-reader> stream-contents
14 ! Writing specialized arrays to binary streams
16 "test.txt" temp-file "wb" fopen <c-writer> [
17 int-array{ 1 2 3 } write
21 { int-array{ 1 2 3 } } [
22 "test.txt" temp-file "rb" fopen <c-reader> [
28 ! Writing strings to binary streams should fail
30 "test.txt" temp-file "wb" fopen <c-writer> [