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:
Christoffer Lerno
2023-10-30 14:07:37 +01:00
committed by Christoffer Lerno
parent e4c1328ef2
commit 1aa038c92f
42 changed files with 789 additions and 890 deletions

View File

@@ -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");
}