Use temp-file in a few tests and benchmarks

db4
Eduardo Cavazos 2008-02-21 22:08:51 -06:00
parent 41ca620271
commit 09e5564435
4 changed files with 7 additions and 7 deletions

View File

@ -2,9 +2,9 @@ USING: tools.test io.files io io.streams.c ;
IN: temporary
[ "hello world" ] [
"test.txt" resource-path [
"test.txt" temp-file [
"hello world" write
] with-file-writer
"test.txt" resource-path "rb" fopen <c-reader> contents
"test.txt" temp-file "rb" fopen <c-reader> contents
] unit-test

View File

@ -65,7 +65,7 @@ SYMBOL: cols
] with-scope ;
: mandel-main ( -- )
"mandel.ppm" resource-path
"mandel.ppm" temp-file
[ mandel write ] with-file-writer ;
MAIN: mandel-main

View File

@ -170,7 +170,7 @@ DEFER: create ( level c r -- scene )
] "" make ;
: raytracer-main
"raytracer.pnm" resource-path
"raytracer.pnm" temp-file
[ run write ] with-file-writer ;
MAIN: raytracer-main

View File

@ -38,8 +38,8 @@ yield
"unix-domain-datagram-test" resource-path delete-file
] ignore-errors
: server-addr "unix-domain-datagram-test" resource-path <local> ;
: client-addr "unix-domain-datagram-test-2" resource-path <local> ;
: server-addr "unix-domain-datagram-test" temp-file <local> ;
: client-addr "unix-domain-datagram-test-2" temp-file <local> ;
[
[
@ -112,7 +112,7 @@ client-addr <datagram>
"unix-domain-datagram-test-3" resource-path delete-file
] ignore-errors
"unix-domain-datagram-test-2" resource-path delete-file
"unix-domain-datagram-test-2" temp-file delete-file
[ ] [ client-addr <datagram> "d" set ] unit-test