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:
2026-06-10 18:52:53 +09:00
parent 08b210d4b4
commit 6ef2bbcb95
5 changed files with 36 additions and 36 deletions

View File

@@ -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 = {