refAllDecls in a test block to limit when it gets run

master
Andrew Kelley 2019-10-24 00:30:17 -04:00
parent 17eb24a7e4
commit 8591731f2b
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
3 changed files with 14 additions and 13 deletions

View File

@ -202,7 +202,7 @@ pub const Complex = complex.Complex;
pub const big = @import("math/big.zig");
comptime {
test "" {
std.meta.refAllDecls(@This());
}

View File

@ -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.

View File

@ -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());
}