Slight updates to match API drift in io, lib-io.rs passes.

This commit is contained in:
Graydon Hoare 2011-04-13 12:05:04 -07:00
parent 01b1d4110d
commit 80a4b1ba53
2 changed files with 5 additions and 5 deletions

View file

@ -13,12 +13,12 @@ fn test_simple(str tmpfilebase) {
log frood; log frood;
{ {
let io.buf_writer out = io.new_buf_writer(tmpfile, vec(io.create)); let io.writer out = io.file_writer(tmpfile, vec(io.create));
out.write(_str.bytes(frood)); out.write_str(frood);
} }
let io.buf_reader inp = io.new_buf_reader(tmpfile); let io.reader inp = io.file_reader(tmpfile);
let str frood2 = _str.from_bytes(inp.read()); let str frood2 = inp.read_c_str();
log frood2; log frood2;
check (_str.eq(frood, frood2)); check (_str.eq(frood, frood2));
} }