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

@ -115,7 +115,7 @@ state obj new_reader(buf_reader rdr) {
// See _str.char_at
val += ((b0 << ((w + 1u) as u8)) as uint) << ((w - 1u) * 6u - w - 1u);
ret val as char;
}
}
impure fn eof() -> bool {
ret rdr.eof();
}

View file

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