Fix on rethrow + macros.

This commit is contained in:
Christoffer Lerno
2023-06-27 20:40:46 +02:00
parent 550b1f23ec
commit 57c8b5fc75
10 changed files with 140 additions and 46 deletions

View File

@@ -17,9 +17,9 @@ fn void! bytestream()
ws.write("helloworld")!;
assert(w.as_str() == "helloworld");
s.seek(0, SET)!;
ws.read_from(&s)!;
ws.read_from(s)!;
s.seek(1, SET)!;
s.write_to(&ws)!;
s.write_to(ws)!;
assert(w.as_str() == "helloworldabcbc");
}
@@ -44,7 +44,7 @@ fn void! bytewriter_read_from()
ByteWriter bw;
bw.tinit();
bw.read_from(&s)!;
bw.read_from(s)!;
assert(bw.as_str() == data);
}

View File

@@ -11,7 +11,7 @@ fn void! test_writing()
ByteReader r;
String test_str = "2134";
r.init(test_str);
s.read_from(&&r.as_stream())!;
s.read_from(r.as_stream())!;
String o = foo.str();
assert(o == "hello-what?2134");
}