mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors.
This commit is contained in:
committed by
Christoffer Lerno
parent
e4c1328ef2
commit
1aa038c92f
@@ -4,13 +4,13 @@ fn void! test_writing()
|
||||
{
|
||||
DString foo;
|
||||
foo.init();
|
||||
Stream* s = DStringStream{}.init(&foo);
|
||||
OutStream* s = &foo;
|
||||
s.write("hello")!!;
|
||||
s.write_byte('-')!!;
|
||||
s.write("what?-------------------------------------------------------")!!;
|
||||
ByteReader r;
|
||||
String test_str = "2134";
|
||||
s.read_from(r.init(test_str))!;
|
||||
io::copy_to(r.init(test_str), s)!;
|
||||
String o = foo.str_view();
|
||||
assert(o == "hello-what?-------------------------------------------------------2134");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user