mirror of
https://github.com/ziglang/zig.git
synced 2024-12-01 01:22:50 +00:00
6664d2418d
The new testing harness is not bound by previous limitations; it can now test compile log output as well.
23 lines
496 B
Zig
23 lines
496 B
Zig
export fn _start() noreturn {
|
|
const b = true;
|
|
var f: u32 = 1;
|
|
@compileLog(b, 20, f, x);
|
|
@compileLog(1000);
|
|
var bruh: usize = true;
|
|
_ = bruh;
|
|
unreachable;
|
|
}
|
|
export fn other() void {
|
|
@compileLog(1234);
|
|
}
|
|
fn x() void {}
|
|
|
|
// error
|
|
//
|
|
// :6:23: error: expected type 'usize', found 'bool'
|
|
//
|
|
// Compile Log Output:
|
|
// @as(bool, true), @as(comptime_int, 20), @as(u32, [runtime value]), @as(fn() void, (function 'x'))
|
|
// @as(comptime_int, 1000)
|
|
// @as(comptime_int, 1234)
|