Basic file tests

Brian T Rice water at tunes.org
Wed Jan 21 08:51:54 PST 2004


On Wed, 21 Jan 2004, John Leuner wrote:

> I have written some very basic tests for file.slate.
>
> src/file.test
> src/sunit/file/testfile.txt

Cool. I'll have a look at these and incorporate as I can.

> I am not sure whether I have to call close on each File or whether the
> garbage collector will eventually call some kind of finalizer.

You should call close if at all possible. I'm trying to set up some
"simple smarts" for it, like a File Stream calling close on its File when
it is closed, and then the File seeing if there's any other stream on it
(read vs. write), and then closing or raising a minor condition
(catchable, but won't invoke the debugger by default).

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Slate mailing list