modules/compiler.sx -> modules/build.sx; stb/stb_truetype/opengl/sdl3 -> modules/ffi/; modules/process.sx -> modules/std/process.sx. Rebuilt for macos + ios-sim; 23/23 logic snapshots pass.
16 lines
577 B
Plaintext
16 lines
577 B
Plaintext
// m3te logic-test assert helper.
|
|
//
|
|
// `expect(cond, msg)` is a no-op when `cond` holds. On a false condition it
|
|
// prints a single greppable `FAIL <file>:<line>: <msg>` line to stdout and
|
|
// terminates the process NON-ZERO (exit 1) via process.exit, so a broken
|
|
// assertion fails `tools/run_tests.sh` and the build gate.
|
|
#import "modules/std.sx";
|
|
proc :: #import "modules/std/process.sx";
|
|
|
|
expect :: (cond: bool, msg: string, loc: Source_Location = #caller_location) {
|
|
if !cond {
|
|
print("FAIL {}:{}: {}\n", loc.file, loc.line, msg);
|
|
proc.exit(1);
|
|
}
|
|
}
|