mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Create a unit7 for all unit tests.
This commit is contained in:
@@ -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));
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user