lib/hash tests: hand-main plumbing -> assert (@test conversion B1)
signalled/fail() counters and run-loop plumbing removed; failure sites become assert(!(cond)); table rows and @test fns 1:1. Bare mains stay until the -T flip commit. Spec: .ai/drew-t2-conversion-spec.md.
This commit is contained in:
@@ -16,14 +16,14 @@ fn check(s: str, want: u32) void = {
|
||||
let n: i32 = putstr(s, arr[0:256], 0);
|
||||
let buf: []u8 = arr[0:n];
|
||||
let got: u32 = adler32.sum32(buf);
|
||||
if (got != want) { let _: i32 = 1/0; };
|
||||
assert(!(got != want));
|
||||
};
|
||||
|
||||
@test fn vec_empty() void = {
|
||||
let arr: [1]u8;
|
||||
let buf: []u8 = arr[0:0];
|
||||
let h: u32 = adler32.sum32(buf);
|
||||
if (h != 1u32) { let _: i32 = 1/0; };
|
||||
assert(!(h != 1u32));
|
||||
};
|
||||
|
||||
@test fn vec_helloworld() void = {
|
||||
|
||||
Reference in New Issue
Block a user