zig/doc/langref/testing_detect_test.zig

14 lines
214 B
Zig

const std = @import("std");
const builtin = @import("builtin");
const expect = std.testing.expect;
test "builtin.is_test" {
try expect(isATest());
}
fn isATest() bool {
return builtin.is_test;
}
// test