Create a unit7 for all unit tests.

This commit is contained in:
Christoffer Lerno
2025-02-24 01:05:45 +01:00
parent 70029cc4b8
commit 87725a3a9e
128 changed files with 9311 additions and 103 deletions

View File

@@ -77,13 +77,13 @@ macro void! CsvReader.@each_row(self, int rows = int.max; @body(String[] row)) @
{
@stack_mem(512; Allocator mem)
{
String! s = io::readline(stream, mem);
String! s = io::readline(mem, stream);
if (catch err = s)
{
if (err == IoError.EOF) return;
return err?;
}
@body(s.split(sep, allocator: mem));
@body(s.split(mem, sep));
};
}
}

View File

@@ -27,9 +27,9 @@ fn Object*! tparse_string(String s)
fn Object*! parse(Allocator allocator, InStream s)
{
@stack_mem(512; Allocator mem)
@stack_mem(512; Allocator smem)
{
JsonContext context = { .last_string = dstring::new_with_capacity(mem, 64), .stream = s, .allocator = allocator };
JsonContext context = { .last_string = dstring::new_with_capacity(smem, 64), .stream = s, .allocator = allocator };
@pool(allocator)
{
return parse_any(&context);