| author | |
| committer | |
| log | da2af9c613841552e9e47b6c9f0e9e4ee74894fb |
| tree | df31e159e25b97021c9446a21704f79e075e1f2d |
| parent | 0dcadc61b4ce8fb3ffb75b8f266bff2c6ae149b6 |
4 files changed, 9 insertions(+), 14 deletions(-)
std/os/index.zig+1-2| ... | @@ -4,8 +4,7 @@ const Os = builtin.Os; | ... | @@ -4,8 +4,7 @@ const Os = builtin.Os; |
| 4 | const is_windows = builtin.os == Os.windows; | 4 | const is_windows = builtin.os == Os.windows; |
| 5 | const os = this; | 5 | const os = this; |
| 6 | 6 | ||
| 7 | comptime { | 7 | test "std.os" { |
| 8 | if (!builtin.is_test) return; | ||
| 9 | _ = @import("child_process.zig"); | 8 | _ = @import("child_process.zig"); |
| 10 | _ = @import("darwin.zig"); | 9 | _ = @import("darwin.zig"); |
| 11 | _ = @import("darwin_errno.zig"); | 10 | _ = @import("darwin_errno.zig"); |
std/os/linux/index.zig+4-3| ... | @@ -1309,7 +1309,8 @@ pub fn capset(hdrp: &cap_user_header_t, datap: &const cap_user_data_t) usize { | ... | @@ -1309,7 +1309,8 @@ pub fn capset(hdrp: &cap_user_header_t, datap: &const cap_user_data_t) usize { |
| 1309 | return syscall2(SYS_capset, @ptrToInt(hdrp), @ptrToInt(datap)); | 1309 | return syscall2(SYS_capset, @ptrToInt(hdrp), @ptrToInt(datap)); |
| 1310 | } | 1310 | } |
| 1311 | 1311 | ||
| 1312 | comptime { | 1312 | test "import" { |
| 1313 | if (!builtin.is_test) return; | 1313 | if (builtin.os == builtin.Os.linux) { |
| 1314 | _ = @import("test.zig"); | 1314 | _ = @import("test.zig"); |
| 1315 | } | ||
| 1315 | } | 1316 | } |
std/os/linux/test.zig-2| ... | @@ -4,8 +4,6 @@ const linux = std.os.linux; | ... | @@ -4,8 +4,6 @@ const linux = std.os.linux; |
| 4 | const assert = std.debug.assert; | 4 | const assert = std.debug.assert; |
| 5 | 5 | ||
| 6 | test "timer" { | 6 | test "timer" { |
| 7 | if (builtin.os != builtin.Os.linux) return; | ||
| 8 | |||
| 9 | const epoll_fd = linux.epoll_create(); | 7 | const epoll_fd = linux.epoll_create(); |
| 10 | var err = linux.getErrno(epoll_fd); | 8 | var err = linux.getErrno(epoll_fd); |
| 11 | assert(err == 0); | 9 | assert(err == 0); |
std/os/windows/index.zig+4-7| ... | @@ -1,10 +1,3 @@ | ... | @@ -1,10 +1,3 @@ |
| 1 | const builtin = @import("builtin"); | ||
| 2 | comptime { | ||
| 3 | if (!builtin.is_test) return; | ||
| 4 | _ = @import("util.zig"); | ||
| 5 | } | ||
| 6 | |||
| 7 | |||
| 8 | pub const ERROR = @import("error.zig"); | 1 | pub const ERROR = @import("error.zig"); |
| 9 | 2 | ||
| 10 | pub extern "advapi32" stdcallcc fn CryptAcquireContextA(phProv: &HCRYPTPROV, pszContainer: ?LPCSTR, | 3 | pub extern "advapi32" stdcallcc fn CryptAcquireContextA(phProv: &HCRYPTPROV, pszContainer: ?LPCSTR, |
| ... | @@ -324,3 +317,7 @@ pub const FILE_END = 2; | ... | @@ -324,3 +317,7 @@ pub const FILE_END = 2; |
| 324 | pub const HEAP_CREATE_ENABLE_EXECUTE = 0x00040000; | 317 | pub const HEAP_CREATE_ENABLE_EXECUTE = 0x00040000; |
| 325 | pub const HEAP_GENERATE_EXCEPTIONS = 0x00000004; | 318 | pub const HEAP_GENERATE_EXCEPTIONS = 0x00000004; |
| 326 | pub const HEAP_NO_SERIALIZE = 0x00000001; | 319 | pub const HEAP_NO_SERIALIZE = 0x00000001; |
| 320 | |||
| 321 | test "import" { | ||
| 322 | _ = @import("util.zig"); | ||
| 323 | } |