mirror of
https://github.com/ziglang/zig.git
synced 2025-02-08 21:50:33 +00:00
refAllDecls in a test block to limit when it gets run
This commit is contained in:
parent
17eb24a7e4
commit
8591731f2b
@ -202,7 +202,7 @@ pub const Complex = complex.Complex;
|
||||
|
||||
pub const big = @import("math/big.zig");
|
||||
|
||||
comptime {
|
||||
test "" {
|
||||
std.meta.refAllDecls(@This());
|
||||
}
|
||||
|
||||
|
@ -34,18 +34,19 @@ pub const zen = @import("os/zen.zig");
|
||||
|
||||
comptime {
|
||||
assert(@import("std") == std); // std lib tests require --override-lib-dir
|
||||
if (builtin.is_test) {
|
||||
_ = darwin;
|
||||
_ = freebsd;
|
||||
_ = linux;
|
||||
_ = netbsd;
|
||||
_ = uefi;
|
||||
_ = wasi;
|
||||
_ = windows;
|
||||
_ = zen;
|
||||
}
|
||||
|
||||
_ = @import("os/test.zig");
|
||||
}
|
||||
test "" {
|
||||
_ = darwin;
|
||||
_ = freebsd;
|
||||
_ = linux;
|
||||
_ = netbsd;
|
||||
_ = uefi;
|
||||
_ = wasi;
|
||||
_ = windows;
|
||||
_ = zen;
|
||||
|
||||
_ = @import("os/test.zig");
|
||||
}
|
||||
|
||||
/// When linking libc, this is the C API. Otherwise, it is the OS-specific system interface.
|
||||
|
@ -65,6 +65,6 @@ pub const unicode = @import("unicode.zig");
|
||||
pub const valgrind = @import("valgrind.zig");
|
||||
pub const zig = @import("zig.zig");
|
||||
|
||||
comptime {
|
||||
test "" {
|
||||
meta.refAllDecls(@This());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user