From a2ff3a13fe22b5693bbd719bf4eaee06a9d6be57 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 30 Aug 2021 14:43:46 -0700 Subject: [PATCH] std, compiler-rt: remove test names where applicable Tests with no names are executed when using `zig test` regardless of the `--test-filter` used. Non-named tests should be used when simply importing unit tests from another file. This allows `zig test` to find all the appropriate tests, even when using `--test-filter`. --- lib/std/event.zig | 2 +- lib/std/json.zig | 2 +- lib/std/os/linux/arm-eabi.zig | 2 ++ lib/std/os/linux/arm64.zig | 1 + lib/std/os/linux/bpf.zig | 15 ++++++++----- lib/std/os/linux/bpf/btf.zig | 2 ++ lib/std/os/linux/bpf/helpers.zig | 5 +++++ lib/std/os/linux/i386.zig | 24 ++++++--------------- lib/std/os/linux/mips.zig | 1 + lib/std/os/linux/powerpc.zig | 2 ++ lib/std/os/linux/powerpc64.zig | 2 ++ lib/std/os/linux/sparc64.zig | 1 + lib/std/special/compiler_rt/addXf3.zig | 2 +- lib/std/special/compiler_rt/divdf3.zig | 2 +- lib/std/special/compiler_rt/divsf3.zig | 2 +- lib/std/special/compiler_rt/divtf3.zig | 2 +- lib/std/special/compiler_rt/divti3.zig | 2 +- lib/std/special/compiler_rt/extendXfYf2.zig | 2 +- lib/std/special/compiler_rt/fixdfdi.zig | 2 +- lib/std/special/compiler_rt/fixdfsi.zig | 2 +- lib/std/special/compiler_rt/fixdfti.zig | 2 +- lib/std/special/compiler_rt/fixint.zig | 2 +- lib/std/special/compiler_rt/fixsfdi.zig | 2 +- lib/std/special/compiler_rt/fixsfsi.zig | 2 +- lib/std/special/compiler_rt/fixsfti.zig | 2 +- lib/std/special/compiler_rt/fixtfdi.zig | 2 +- lib/std/special/compiler_rt/fixtfsi.zig | 2 +- lib/std/special/compiler_rt/fixtfti.zig | 2 +- lib/std/special/compiler_rt/fixunsdfdi.zig | 2 +- lib/std/special/compiler_rt/fixunsdfsi.zig | 2 +- lib/std/special/compiler_rt/fixunsdfti.zig | 2 +- lib/std/special/compiler_rt/fixunssfdi.zig | 2 +- lib/std/special/compiler_rt/fixunssfsi.zig | 2 +- lib/std/special/compiler_rt/fixunssfti.zig | 2 +- lib/std/special/compiler_rt/fixunstfdi.zig | 2 +- lib/std/special/compiler_rt/fixunstfsi.zig | 2 +- lib/std/special/compiler_rt/fixunstfti.zig | 2 +- lib/std/special/compiler_rt/floatXisf.zig | 4 ++-- lib/std/special/compiler_rt/floatdidf.zig | 2 +- lib/std/special/compiler_rt/floatditf.zig | 2 +- lib/std/special/compiler_rt/floattidf.zig | 2 +- lib/std/special/compiler_rt/floattitf.zig | 2 +- lib/std/special/compiler_rt/floatundidf.zig | 2 +- lib/std/special/compiler_rt/floatunditf.zig | 2 +- lib/std/special/compiler_rt/floatunsitf.zig | 2 +- lib/std/special/compiler_rt/floatuntidf.zig | 2 +- lib/std/special/compiler_rt/floatuntisf.zig | 2 +- lib/std/special/compiler_rt/floatuntitf.zig | 2 +- lib/std/special/compiler_rt/modti3.zig | 2 +- lib/std/special/compiler_rt/mulXf3.zig | 2 +- lib/std/special/compiler_rt/muldi3.zig | 2 +- lib/std/special/compiler_rt/mulodi4.zig | 4 +--- lib/std/special/compiler_rt/muloti4.zig | 2 +- lib/std/special/compiler_rt/multi3.zig | 2 +- lib/std/special/compiler_rt/popcountdi2.zig | 2 +- lib/std/special/compiler_rt/truncXfYf2.zig | 2 +- lib/std/special/compiler_rt/udivmodti4.zig | 2 +- 57 files changed, 81 insertions(+), 72 deletions(-) diff --git a/lib/std/event.zig b/lib/std/event.zig index 6e608b54f04b9d56bcb3ab83912bddd3df332aa8..b0d61afbd9682c970660a3abaf763e06cae97cae 100644 --- a/lib/std/event.zig +++ b/lib/std/event.zig @@ -9,7 +9,7 @@ pub const RwLocked = @import("event/rwlocked.zig").RwLocked; pub const Loop = @import("event/loop.zig").Loop; pub const WaitGroup = @import("event/wait_group.zig").WaitGroup; -test "import event tests" { +test { _ = @import("event/channel.zig"); _ = @import("event/future.zig"); _ = @import("event/group.zig"); diff --git a/lib/std/json.zig b/lib/std/json.zig index d3da57d18b7a87941cf833edc70e68da62cd402e..e8f9d9d39512491cabccef6d2868a97f629eb01f 100644 --- a/lib/std/json.zig +++ b/lib/std/json.zig @@ -2657,7 +2657,7 @@ test "json.parser.dynamic" { try testing.expect(mem.eql(u8, large_int.NumberString, "18446744073709551615")); } -test "import more json tests" { +test { _ = @import("json/test.zig"); _ = @import("json/write_stream.zig"); } diff --git a/lib/std/os/linux/arm-eabi.zig b/lib/std/os/linux/arm-eabi.zig index 8f472b87f5b15b56a4ca2ae7a9eae82d4c6ee4ee..700761fe355a216b7af4174f3929c9d0b02fb430 100644 --- a/lib/std/os/linux/arm-eabi.zig +++ b/lib/std/os/linux/arm-eabi.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const linux = std.os.linux; const iovec = std.os.iovec; const iovec_const = std.os.iovec_const; @@ -8,6 +9,7 @@ const sigset_t = linux.sigset_t; const uid_t = linux.uid_t; const gid_t = linux.gid_t; const pid_t = linux.pid_t; +const sockaddr = linux.sockaddr; pub fn syscall0(number: SYS) usize { return asm volatile ("svc #0" diff --git a/lib/std/os/linux/arm64.zig b/lib/std/os/linux/arm64.zig index 1c3033a226fdeba5b0a8057cac43367b0b16769c..13321f45959365ebe1b1e79b573ab70c997c98de 100644 --- a/lib/std/os/linux/arm64.zig +++ b/lib/std/os/linux/arm64.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const linux = std.os.linux; const socklen_t = linux.socklen_t; const sockaddr = linux.sockaddr; diff --git a/lib/std/os/linux/bpf.zig b/lib/std/os/linux/bpf.zig index a1d2a86bb601a10a09f83ffc5c7d7cc8c8c90ec6..4cb9dbf5c53992d0ba8965db0254430896f6b0c5 100644 --- a/lib/std/os/linux/bpf.zig +++ b/lib/std/os/linux/bpf.zig @@ -5,6 +5,11 @@ const expectEqual = std.testing.expectEqual; const expectError = std.testing.expectError; const expect = std.testing.expect; +const linux = std.os.linux; +const fd_t = linux.fd_t; +const pid_t = linux.pid_t; +const getErrno = linux.getErrno; + pub const btf = @import("bpf/btf.zig"); pub const kern = @import("bpf/kern.zig"); @@ -1501,7 +1506,7 @@ pub fn map_create(map_type: MapType, key_size: u32, value_size: u32, max_entries attr.map_create.value_size = value_size; attr.map_create.max_entries = max_entries; - const rc = bpf(.map_create, &attr, @sizeOf(MapCreateAttr)); + const rc = linux.bpf(.map_create, &attr, @sizeOf(MapCreateAttr)); switch (errno(rc)) { .SUCCESS => return @intCast(fd_t, rc), .INVAL => return error.MapTypeOrAttrInvalid, @@ -1525,7 +1530,7 @@ pub fn map_lookup_elem(fd: fd_t, key: []const u8, value: []u8) !void { attr.map_elem.key = @ptrToInt(key.ptr); attr.map_elem.result.value = @ptrToInt(value.ptr); - const rc = bpf(.map_lookup_elem, &attr, @sizeOf(MapElemAttr)); + const rc = linux.bpf(.map_lookup_elem, &attr, @sizeOf(MapElemAttr)); switch (errno(rc)) { .SUCCESS => return, .BADF => return error.BadFd, @@ -1547,7 +1552,7 @@ pub fn map_update_elem(fd: fd_t, key: []const u8, value: []const u8, flags: u64) attr.map_elem.result = .{ .value = @ptrToInt(value.ptr) }; attr.map_elem.flags = flags; - const rc = bpf(.map_update_elem, &attr, @sizeOf(MapElemAttr)); + const rc = linux.bpf(.map_update_elem, &attr, @sizeOf(MapElemAttr)); switch (errno(rc)) { .SUCCESS => return, .@"2BIG" => return error.ReachedMaxEntries, @@ -1568,7 +1573,7 @@ pub fn map_delete_elem(fd: fd_t, key: []const u8) !void { attr.map_elem.map_fd = fd; attr.map_elem.key = @ptrToInt(key.ptr); - const rc = bpf(.map_delete_elem, &attr, @sizeOf(MapElemAttr)); + const rc = linux.bpf(.map_delete_elem, &attr, @sizeOf(MapElemAttr)); switch (errno(rc)) { .SUCCESS => return, .BADF => return error.BadFd, @@ -1631,7 +1636,7 @@ pub fn prog_load( attr.prog_load.log_level = l.level; } - const rc = bpf(.prog_load, &attr, @sizeOf(ProgLoadAttr)); + const rc = linux.bpf(.prog_load, &attr, @sizeOf(ProgLoadAttr)); return switch (errno(rc)) { .SUCCESS => @intCast(fd_t, rc), .ACCES => error.UnsafeProgram, diff --git a/lib/std/os/linux/bpf/btf.zig b/lib/std/os/linux/bpf/btf.zig index 35eaf10561068221f9c3f62106f8257da8434cd0..8da3bbbe4c14fdaf9c296ec54e3e03b3993e52db 100644 --- a/lib/std/os/linux/bpf/btf.zig +++ b/lib/std/os/linux/bpf/btf.zig @@ -1,3 +1,5 @@ +const std = @import("../../../std.zig"); + const magic = 0xeb9f; const version = 1; diff --git a/lib/std/os/linux/bpf/helpers.zig b/lib/std/os/linux/bpf/helpers.zig index 86c86c1ec5a6ae946ce73555787851c7580e442c..3b0df9673c832be94b70860527fbe899a8e8aaff 100644 --- a/lib/std/os/linux/bpf/helpers.zig +++ b/lib/std/os/linux/bpf/helpers.zig @@ -1,5 +1,10 @@ +const std = @import("../../../std.zig"); const kern = @import("kern.zig"); +const PtRegs = @compileError("TODO missing os bits: PtRegs"); +const TcpHdr = @compileError("TODO missing os bits: TcpHdr"); +const SkFullSock = @compileError("TODO missing os bits: SkFullSock"); + // in BPF, all the helper calls // TODO: when https://github.com/ziglang/zig/issues/1717 is here, make a nice // function that uses the Helper enum diff --git a/lib/std/os/linux/i386.zig b/lib/std/os/linux/i386.zig index bedc2ec6c3ce32599ca8f665c35690df9b2697b2..8efe21a8e4485a7d88aa656a64f24ae63fa63cbd 100644 --- a/lib/std/os/linux/i386.zig +++ b/lib/std/os/linux/i386.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const linux = std.os.linux; const socklen_t = linux.socklen_t; const iovec = linux.iovec; @@ -8,6 +9,7 @@ const gid_t = linux.gid_t; const pid_t = linux.pid_t; const stack_t = linux.stack_t; const sigset_t = linux.sigset_t; +const sockaddr = linux.sockaddr; pub fn syscall0(number: SYS) usize { return asm volatile ("int $0x80" @@ -628,40 +630,28 @@ pub const LOCK = struct { pub const MAP = struct { /// Share changes pub const SHARED = 0x01; - /// Changes are private pub const PRIVATE = 0x02; - /// share + validate extension flags pub const SHARED_VALIDATE = 0x03; - /// Mask for type of mapping pub const TYPE = 0x0f; - /// Interpret addr exactly pub const FIXED = 0x10; - /// don't use a file - pub const ANONYMOUS = if (is_mips) 0x800 else 0x20; - + pub const ANONYMOUS = 0x20; /// populate (prefault) pagetables - pub const POPULATE = if (is_mips) 0x10000 else 0x8000; - + pub const POPULATE = 0x8000; /// do not block on IO - pub const NONBLOCK = if (is_mips) 0x20000 else 0x10000; - + pub const NONBLOCK = 0x10000; /// give out an address that is best suited for process/thread stacks - pub const STACK = if (is_mips) 0x40000 else 0x20000; - + pub const STACK = 0x20000; /// create a huge page mapping - pub const HUGETLB = if (is_mips) 0x80000 else 0x40000; - + pub const HUGETLB = 0x40000; /// perform synchronous page faults for the mapping pub const SYNC = 0x80000; - /// FIXED which doesn't unmap underlying mapping pub const FIXED_NOREPLACE = 0x100000; - /// For anonymous mmap, memory could be uninitialized pub const UNINITIALIZED = 0x4000000; diff --git a/lib/std/os/linux/mips.zig b/lib/std/os/linux/mips.zig index cc8334cf49cd23ed23f0cdbcb335fb49fc18f498..f4bdef609daf07e7c35d3389b10c3aa8559a054b 100644 --- a/lib/std/os/linux/mips.zig +++ b/lib/std/os/linux/mips.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const linux = std.os.linux; const socklen_t = linux.socklen_t; const iovec = linux.iovec; diff --git a/lib/std/os/linux/powerpc.zig b/lib/std/os/linux/powerpc.zig index 51c85d14725114831f5a22dde2cac407d12957b2..e0c1d32390216d797a385e0fdaa7925010ae4576 100644 --- a/lib/std/os/linux/powerpc.zig +++ b/lib/std/os/linux/powerpc.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const linux = std.os.linux; const socklen_t = linux.socklen_t; const iovec = linux.iovec; @@ -8,6 +9,7 @@ const gid_t = linux.gid_t; const pid_t = linux.pid_t; const stack_t = linux.stack_t; const sigset_t = linux.sigset_t; +const sockaddr = linux.sockaddr; pub fn syscall0(number: SYS) usize { return asm volatile ( diff --git a/lib/std/os/linux/powerpc64.zig b/lib/std/os/linux/powerpc64.zig index 366ddbffa86863297567b534b436a8bf9cb41d59..62586eb0f771f7d60bb73d3709e21bd2e4c8f991 100644 --- a/lib/std/os/linux/powerpc64.zig +++ b/lib/std/os/linux/powerpc64.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const linux = std.os.linux; const socklen_t = linux.socklen_t; const iovec = linux.iovec; @@ -8,6 +9,7 @@ const gid_t = linux.gid_t; const pid_t = linux.pid_t; const stack_t = linux.stack_t; const sigset_t = linux.sigset_t; +const sockaddr = linux.sockaddr; pub fn syscall0(number: SYS) usize { return asm volatile ( diff --git a/lib/std/os/linux/sparc64.zig b/lib/std/os/linux/sparc64.zig index fd34b34ae4c2dc346cb481f86f1ba9e8053ee6b9..aa50b8364bbf8c38a429a786c2a14d4a3f65e344 100644 --- a/lib/std/os/linux/sparc64.zig +++ b/lib/std/os/linux/sparc64.zig @@ -1,4 +1,5 @@ const std = @import("../../std.zig"); +const maxInt = std.math.maxInt; const pid_t = linux.pid_t; const uid_t = linux.uid_t; const clock_t = linux.clock_t; diff --git a/lib/std/special/compiler_rt/addXf3.zig b/lib/std/special/compiler_rt/addXf3.zig index 59e9393ad6c77823090acf085e89848dc012a6b7..4c741103108c1683f41927595f67b8b774a8d6c0 100644 --- a/lib/std/special/compiler_rt/addXf3.zig +++ b/lib/std/special/compiler_rt/addXf3.zig @@ -225,6 +225,6 @@ fn addXf3(comptime T: type, a: T, b: T) T { return @bitCast(T, result); } -test "import addXf3" { +test { _ = @import("addXf3_test.zig"); } diff --git a/lib/std/special/compiler_rt/divdf3.zig b/lib/std/special/compiler_rt/divdf3.zig index b39e428d96881fcb71e38518697d9d54bf9900e7..ebb139f324067e0bb685455b46d9e300dcac377d 100644 --- a/lib/std/special/compiler_rt/divdf3.zig +++ b/lib/std/special/compiler_rt/divdf3.zig @@ -327,6 +327,6 @@ pub fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 { return @call(.{ .modifier = .always_inline }, __divdf3, .{ a, b }); } -test "import divdf3" { +test { _ = @import("divdf3_test.zig"); } diff --git a/lib/std/special/compiler_rt/divsf3.zig b/lib/std/special/compiler_rt/divsf3.zig index b44f19506d356bcb0ce3d2f4bcf0e320fd940ac8..af4cfaaa868ee979eaa77cef5e3c4663f1ce2d54 100644 --- a/lib/std/special/compiler_rt/divsf3.zig +++ b/lib/std/special/compiler_rt/divsf3.zig @@ -200,6 +200,6 @@ pub fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 { return @call(.{ .modifier = .always_inline }, __divsf3, .{ a, b }); } -test "import divsf3" { +test { _ = @import("divsf3_test.zig"); } diff --git a/lib/std/special/compiler_rt/divtf3.zig b/lib/std/special/compiler_rt/divtf3.zig index ea71c7502f91d6436892c58c201db73be8970223..4dce86087dcf4266b3a9ca1beb4c1d2799d20b9b 100644 --- a/lib/std/special/compiler_rt/divtf3.zig +++ b/lib/std/special/compiler_rt/divtf3.zig @@ -221,6 +221,6 @@ pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 { } } -test "import divtf3" { +test { _ = @import("divtf3_test.zig"); } diff --git a/lib/std/special/compiler_rt/divti3.zig b/lib/std/special/compiler_rt/divti3.zig index 1fb7947e6f61b14aeac77c8bd734e6b149fb1825..41286c34141dfa2806ff5b009fa936337c17c418 100644 --- a/lib/std/special/compiler_rt/divti3.zig +++ b/lib/std/special/compiler_rt/divti3.zig @@ -23,6 +23,6 @@ pub fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 { })); } -test "import divti3" { +test { _ = @import("divti3_test.zig"); } diff --git a/lib/std/special/compiler_rt/extendXfYf2.zig b/lib/std/special/compiler_rt/extendXfYf2.zig index 1c95fd68c1c114e4045a86d05cc6ae26114641be..5571bd9ed3ca501ef860bdb64c8141d7cc9c490a 100644 --- a/lib/std/special/compiler_rt/extendXfYf2.zig +++ b/lib/std/special/compiler_rt/extendXfYf2.zig @@ -104,6 +104,6 @@ fn extendXfYf2(comptime dst_t: type, comptime src_t: type, a: std.meta.Int(.unsi return @bitCast(dst_t, result); } -test "import extendXfYf2" { +test { _ = @import("extendXfYf2_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixdfdi.zig b/lib/std/special/compiler_rt/fixdfdi.zig index 11b50091294ed250563d21e1856efc02a8eee8b3..6c69f10e090e7720451971e9571d6e20a8087742 100644 --- a/lib/std/special/compiler_rt/fixdfdi.zig +++ b/lib/std/special/compiler_rt/fixdfdi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_d2lz(arg: f64) callconv(.AAPCS) i64 { return @call(.{ .modifier = .always_inline }, __fixdfdi, .{arg}); } -test "import fixdfdi" { +test { _ = @import("fixdfdi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixdfsi.zig b/lib/std/special/compiler_rt/fixdfsi.zig index 8a6d8da34203bdd102de75614a46610d2ed5efc6..5842d99cd3074770bbda2398402eb1d140e51b86 100644 --- a/lib/std/special/compiler_rt/fixdfsi.zig +++ b/lib/std/special/compiler_rt/fixdfsi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_d2iz(a: f64) callconv(.AAPCS) i32 { return @call(.{ .modifier = .always_inline }, __fixdfsi, .{a}); } -test "import fixdfsi" { +test { _ = @import("fixdfsi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixdfti.zig b/lib/std/special/compiler_rt/fixdfti.zig index 0e21f0ba192147cee20614c3c63657ed90dd8baa..e8af6a2daf0999500e541f46706d2c59229b10d7 100644 --- a/lib/std/special/compiler_rt/fixdfti.zig +++ b/lib/std/special/compiler_rt/fixdfti.zig @@ -6,6 +6,6 @@ pub fn __fixdfti(a: f64) callconv(.C) i128 { return fixint(f64, i128, a); } -test "import fixdfti" { +test { _ = @import("fixdfti_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixint.zig b/lib/std/special/compiler_rt/fixint.zig index 6ef647410580d358253f53fb29494bb03173c9c6..ff0577c115123052e24f382b4aef2a8178584f3b 100644 --- a/lib/std/special/compiler_rt/fixint.zig +++ b/lib/std/special/compiler_rt/fixint.zig @@ -70,6 +70,6 @@ pub fn fixint(comptime fp_t: type, comptime fixint_t: type, a: fp_t) fixint_t { } } -test "import fixint" { +test { _ = @import("fixint_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixsfdi.zig b/lib/std/special/compiler_rt/fixsfdi.zig index d0d958cdd6b310c295307c0644ae56981b79c4aa..64961075d05b68a75c78f13ece3243e4faf8ea98 100644 --- a/lib/std/special/compiler_rt/fixsfdi.zig +++ b/lib/std/special/compiler_rt/fixsfdi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_f2lz(arg: f32) callconv(.AAPCS) i64 { return @call(.{ .modifier = .always_inline }, __fixsfdi, .{arg}); } -test "import fixsfdi" { +test { _ = @import("fixsfdi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixsfsi.zig b/lib/std/special/compiler_rt/fixsfsi.zig index 84395d0fa67a8689a3e12f1ed1602d16774eb115..932a6e1a4fc39046322d3aa1c6dd7d25ceb7f270 100644 --- a/lib/std/special/compiler_rt/fixsfsi.zig +++ b/lib/std/special/compiler_rt/fixsfsi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 { return @call(.{ .modifier = .always_inline }, __fixsfsi, .{a}); } -test "import fixsfsi" { +test { _ = @import("fixsfsi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixsfti.zig b/lib/std/special/compiler_rt/fixsfti.zig index d7ce4b3a602d6ffe9184e418270404fb3d63ab12..e67bbabbd747cc0a0628c3a8c11fa78d124fb215 100644 --- a/lib/std/special/compiler_rt/fixsfti.zig +++ b/lib/std/special/compiler_rt/fixsfti.zig @@ -6,6 +6,6 @@ pub fn __fixsfti(a: f32) callconv(.C) i128 { return fixint(f32, i128, a); } -test "import fixsfti" { +test { _ = @import("fixsfti_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixtfdi.zig b/lib/std/special/compiler_rt/fixtfdi.zig index 0ef3aa225937ad6b4af07c725efdce8a1cbba70b..6087d7e7206f755058f2ce66ceb877a890fc2b4d 100644 --- a/lib/std/special/compiler_rt/fixtfdi.zig +++ b/lib/std/special/compiler_rt/fixtfdi.zig @@ -6,6 +6,6 @@ pub fn __fixtfdi(a: f128) callconv(.C) i64 { return fixint(f128, i64, a); } -test "import fixtfdi" { +test { _ = @import("fixtfdi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixtfsi.zig b/lib/std/special/compiler_rt/fixtfsi.zig index 15e89a11b0b0820fda7bd70ead0a3e36d14b3ac8..b5fea97c5ca0dc17e5f88e23f06f416d212598a8 100644 --- a/lib/std/special/compiler_rt/fixtfsi.zig +++ b/lib/std/special/compiler_rt/fixtfsi.zig @@ -6,6 +6,6 @@ pub fn __fixtfsi(a: f128) callconv(.C) i32 { return fixint(f128, i32, a); } -test "import fixtfsi" { +test { _ = @import("fixtfsi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixtfti.zig b/lib/std/special/compiler_rt/fixtfti.zig index 733fa1eed1b0be8f4b89f480f2144712db3f039f..5a001d0b69f003f018fe168f8043b291ab27c0c7 100644 --- a/lib/std/special/compiler_rt/fixtfti.zig +++ b/lib/std/special/compiler_rt/fixtfti.zig @@ -6,6 +6,6 @@ pub fn __fixtfti(a: f128) callconv(.C) i128 { return fixint(f128, i128, a); } -test "import fixtfti" { +test { _ = @import("fixtfti_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunsdfdi.zig b/lib/std/special/compiler_rt/fixunsdfdi.zig index 800c9b1148ad4d3074dc7b1e9f48cee630e2fd17..c864f0f6c2e6e4220543f04d56c70b3cf0a67bad 100644 --- a/lib/std/special/compiler_rt/fixunsdfdi.zig +++ b/lib/std/special/compiler_rt/fixunsdfdi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 { return @call(.{ .modifier = .always_inline }, __fixunsdfdi, .{a}); } -test "import fixunsdfdi" { +test { _ = @import("fixunsdfdi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunsdfsi.zig b/lib/std/special/compiler_rt/fixunsdfsi.zig index 156c21a887b10dea35836310d96435541b22317b..c1f517366142438bc5ab649a1632e9387283070a 100644 --- a/lib/std/special/compiler_rt/fixunsdfsi.zig +++ b/lib/std/special/compiler_rt/fixunsdfsi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_d2uiz(arg: f64) callconv(.AAPCS) u32 { return @call(.{ .modifier = .always_inline }, __fixunsdfsi, .{arg}); } -test "import fixunsdfsi" { +test { _ = @import("fixunsdfsi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunsdfti.zig b/lib/std/special/compiler_rt/fixunsdfti.zig index 3dcec6bf8987635352c1841137f88f331e9f422a..3c9871a4df9ea6f6c3d57afd5160d5b3f9604984 100644 --- a/lib/std/special/compiler_rt/fixunsdfti.zig +++ b/lib/std/special/compiler_rt/fixunsdfti.zig @@ -6,6 +6,6 @@ pub fn __fixunsdfti(a: f64) callconv(.C) u128 { return fixuint(f64, u128, a); } -test "import fixunsdfti" { +test { _ = @import("fixunsdfti_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunssfdi.zig b/lib/std/special/compiler_rt/fixunssfdi.zig index ec00a7ee35c50814414320465012b127eed644b8..edad20e8bf19ad73ae2e1e333bc49f5ac6b14f8a 100644 --- a/lib/std/special/compiler_rt/fixunssfdi.zig +++ b/lib/std/special/compiler_rt/fixunssfdi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_f2ulz(a: f32) callconv(.AAPCS) u64 { return @call(.{ .modifier = .always_inline }, __fixunssfdi, .{a}); } -test "import fixunssfdi" { +test { _ = @import("fixunssfdi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunssfsi.zig b/lib/std/special/compiler_rt/fixunssfsi.zig index a4e5a323f5927e856d9f33e34c1df024145fbad3..96722a2a3648477a1cf59beaa2cb5d087deabbe1 100644 --- a/lib/std/special/compiler_rt/fixunssfsi.zig +++ b/lib/std/special/compiler_rt/fixunssfsi.zig @@ -11,6 +11,6 @@ pub fn __aeabi_f2uiz(a: f32) callconv(.AAPCS) u32 { return @call(.{ .modifier = .always_inline }, __fixunssfsi, .{a}); } -test "import fixunssfsi" { +test { _ = @import("fixunssfsi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunssfti.zig b/lib/std/special/compiler_rt/fixunssfti.zig index dff9eb74980f6136a8af30ea350c3f42d1160ae7..4967202e69172f587af7323d326be3ffeb426d70 100644 --- a/lib/std/special/compiler_rt/fixunssfti.zig +++ b/lib/std/special/compiler_rt/fixunssfti.zig @@ -6,6 +6,6 @@ pub fn __fixunssfti(a: f32) callconv(.C) u128 { return fixuint(f32, u128, a); } -test "import fixunssfti" { +test { _ = @import("fixunssfti_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunstfdi.zig b/lib/std/special/compiler_rt/fixunstfdi.zig index 907116c1650ee53ba9d5b3417ef5ec6253513be9..0db4987a08d31c5d6cba9a61fdb853f6846176d9 100644 --- a/lib/std/special/compiler_rt/fixunstfdi.zig +++ b/lib/std/special/compiler_rt/fixunstfdi.zig @@ -6,6 +6,6 @@ pub fn __fixunstfdi(a: f128) callconv(.C) u64 { return fixuint(f128, u64, a); } -test "import fixunstfdi" { +test { _ = @import("fixunstfdi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunstfsi.zig b/lib/std/special/compiler_rt/fixunstfsi.zig index c66a3f18b492a2bfa05a91324dbe5784a5db6847..8cedc07a3513736a7fa9c692671be376cfa6b384 100644 --- a/lib/std/special/compiler_rt/fixunstfsi.zig +++ b/lib/std/special/compiler_rt/fixunstfsi.zig @@ -6,6 +6,6 @@ pub fn __fixunstfsi(a: f128) callconv(.C) u32 { return fixuint(f128, u32, a); } -test "import fixunstfsi" { +test { _ = @import("fixunstfsi_test.zig"); } diff --git a/lib/std/special/compiler_rt/fixunstfti.zig b/lib/std/special/compiler_rt/fixunstfti.zig index 1867c69234ba49606f774885efba862449e7dedb..03593270270658b954f9825f5b9fbd927b843420 100644 --- a/lib/std/special/compiler_rt/fixunstfti.zig +++ b/lib/std/special/compiler_rt/fixunstfti.zig @@ -6,6 +6,6 @@ pub fn __fixunstfti(a: f128) callconv(.C) u128 { return fixuint(f128, u128, a); } -test "import fixunstfti" { +test { _ = @import("fixunstfti_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatXisf.zig b/lib/std/special/compiler_rt/floatXisf.zig index b02ff5f622e13d2b12f3ff92e9e2391f918545a8..9fc4c711001bcf1c145a243f1062388cd5b01e23 100644 --- a/lib/std/special/compiler_rt/floatXisf.zig +++ b/lib/std/special/compiler_rt/floatXisf.zig @@ -85,9 +85,9 @@ pub fn __aeabi_l2f(arg: i64) callconv(.AAPCS) f32 { return @call(.{ .modifier = .always_inline }, __floatdisf, .{arg}); } -test "import floattisf" { +test { _ = @import("floattisf_test.zig"); } -test "import floatdisf" { +test { _ = @import("floattisf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatdidf.zig b/lib/std/special/compiler_rt/floatdidf.zig index afe9e906fd81533a71072ec193bad214bfb85802..16a514b615c51866f3dfccb116cd99678707bcc0 100644 --- a/lib/std/special/compiler_rt/floatdidf.zig +++ b/lib/std/special/compiler_rt/floatdidf.zig @@ -22,6 +22,6 @@ pub fn __aeabi_l2d(arg: i64) callconv(.AAPCS) f64 { return @call(.{ .modifier = .always_inline }, __floatdidf, .{arg}); } -test "import floatdidf" { +test { _ = @import("floatdidf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatditf.zig b/lib/std/special/compiler_rt/floatditf.zig index 581a0e0532bc45f5348db802f4718b6aced93c44..fef696e6fbea23dfb51be09a3f70546948267462 100644 --- a/lib/std/special/compiler_rt/floatditf.zig +++ b/lib/std/special/compiler_rt/floatditf.zig @@ -33,6 +33,6 @@ pub fn __floatditf(arg: i64) callconv(.C) f128 { return @bitCast(f128, result | sign); } -test "import floatditf" { +test { _ = @import("floatditf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floattidf.zig b/lib/std/special/compiler_rt/floattidf.zig index 6b5013287b9e45f8a8bdc9ea6e5990a68876a029..85f84a23d64404e121fb20665905d689a096ea87 100644 --- a/lib/std/special/compiler_rt/floattidf.zig +++ b/lib/std/special/compiler_rt/floattidf.zig @@ -66,6 +66,6 @@ pub fn __floattidf(arg: i128) callconv(.C) f64 { return @bitCast(f64, low | (high << 32)); } -test "import floattidf" { +test { _ = @import("floattidf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floattitf.zig b/lib/std/special/compiler_rt/floattitf.zig index 90bc241306fe2be609e32800a4362547eaed911c..aa83f6686eba7df9e79e84fe2b832726c03b470b 100644 --- a/lib/std/special/compiler_rt/floattitf.zig +++ b/lib/std/special/compiler_rt/floattitf.zig @@ -66,6 +66,6 @@ pub fn __floattitf(arg: i128) callconv(.C) f128 { return @bitCast(f128, low | (high << 64)); } -test "import floattitf" { +test { _ = @import("floattitf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatundidf.zig b/lib/std/special/compiler_rt/floatundidf.zig index 1efe55da4062babf326dfcddc78b84b0137b7d61..14e74344907e0b5513ef6529b720ddbd78d1cde2 100644 --- a/lib/std/special/compiler_rt/floatundidf.zig +++ b/lib/std/special/compiler_rt/floatundidf.zig @@ -24,6 +24,6 @@ pub fn __aeabi_ul2d(arg: u64) callconv(.AAPCS) f64 { return @call(.{ .modifier = .always_inline }, __floatundidf, .{arg}); } -test "import floatundidf" { +test { _ = @import("floatundidf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatunditf.zig b/lib/std/special/compiler_rt/floatunditf.zig index dda5dd6ea523678f026856a7683b6ef16338d17d..b304c8cdbae03a631dad67e75a373e07e523d381 100644 --- a/lib/std/special/compiler_rt/floatunditf.zig +++ b/lib/std/special/compiler_rt/floatunditf.zig @@ -23,6 +23,6 @@ pub fn __floatunditf(a: u64) callconv(.C) f128 { return @bitCast(f128, result); } -test "import floatunditf" { +test { _ = @import("floatunditf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatunsitf.zig b/lib/std/special/compiler_rt/floatunsitf.zig index a430471f3a7a953a327d50675d992422ffe84623..8774d486ea51b985a0b492a18bc4a536c6e3a458 100644 --- a/lib/std/special/compiler_rt/floatunsitf.zig +++ b/lib/std/special/compiler_rt/floatunsitf.zig @@ -24,6 +24,6 @@ pub fn __floatunsitf(a: u32) callconv(.C) f128 { return @bitCast(f128, result); } -test "import floatunsitf" { +test { _ = @import("floatunsitf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatuntidf.zig b/lib/std/special/compiler_rt/floatuntidf.zig index 5b5adc04910af64e03de2a12765896f0b2660d2f..2c4729a9d8535e6c84eefb09f9b8f3e37ce03681 100644 --- a/lib/std/special/compiler_rt/floatuntidf.zig +++ b/lib/std/special/compiler_rt/floatuntidf.zig @@ -57,6 +57,6 @@ pub fn __floatuntidf(arg: u128) callconv(.C) f64 { return @bitCast(f64, low | (high << 32)); } -test "import floatuntidf" { +test { _ = @import("floatuntidf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatuntisf.zig b/lib/std/special/compiler_rt/floatuntisf.zig index 33e6e41a84fcb28ecdf21f8d447ba58227208ca9..2a54c2e0f3c72810f7df138e987336da9044d5a4 100644 --- a/lib/std/special/compiler_rt/floatuntisf.zig +++ b/lib/std/special/compiler_rt/floatuntisf.zig @@ -56,6 +56,6 @@ pub fn __floatuntisf(arg: u128) callconv(.C) f32 { return @bitCast(f32, high | low); } -test "import floatuntisf" { +test { _ = @import("floatuntisf_test.zig"); } diff --git a/lib/std/special/compiler_rt/floatuntitf.zig b/lib/std/special/compiler_rt/floatuntitf.zig index 0b96076206dbdb69368519a94cd4121032151abf..c35b4dcf7469455f7ad572423e4457c9e2e54bb9 100644 --- a/lib/std/special/compiler_rt/floatuntitf.zig +++ b/lib/std/special/compiler_rt/floatuntitf.zig @@ -57,6 +57,6 @@ pub fn __floatuntitf(arg: u128) callconv(.C) f128 { return @bitCast(f128, low | (high << 64)); } -test "import floatuntitf" { +test { _ = @import("floatuntitf_test.zig"); } diff --git a/lib/std/special/compiler_rt/modti3.zig b/lib/std/special/compiler_rt/modti3.zig index 915b2b95668c629be3a720fa21d8688673bb8c6c..42cbda9627ab7e5d3bb12be7eea52e78f0a9d6f5 100644 --- a/lib/std/special/compiler_rt/modti3.zig +++ b/lib/std/special/compiler_rt/modti3.zig @@ -28,6 +28,6 @@ pub fn __modti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 { })); } -test "import modti3" { +test { _ = @import("modti3_test.zig"); } diff --git a/lib/std/special/compiler_rt/mulXf3.zig b/lib/std/special/compiler_rt/mulXf3.zig index f050cb1711bb6dabb826c576be17b607eaa1194c..1e9171c8cb792aa91e9548bcdccbc54da2bbdceb 100644 --- a/lib/std/special/compiler_rt/mulXf3.zig +++ b/lib/std/special/compiler_rt/mulXf3.zig @@ -294,6 +294,6 @@ fn wideRightShiftWithSticky(comptime Z: type, hi: *Z, lo: *Z, count: u32) void { } } -test "import mulXf3" { +test { _ = @import("mulXf3_test.zig"); } diff --git a/lib/std/special/compiler_rt/muldi3.zig b/lib/std/special/compiler_rt/muldi3.zig index 359484da09aaefcf17897da7fd4811d2838bbf8e..3d426bd48e7bb2eaa8f070ff3e53ed075efd834b 100644 --- a/lib/std/special/compiler_rt/muldi3.zig +++ b/lib/std/special/compiler_rt/muldi3.zig @@ -51,6 +51,6 @@ pub fn __muldi3(a: i64, b: i64) callconv(.C) i64 { return r.all; } -test "import muldi3" { +test { _ = @import("muldi3_test.zig"); } diff --git a/lib/std/special/compiler_rt/mulodi4.zig b/lib/std/special/compiler_rt/mulodi4.zig index 94ed6752cc087302b0961e2213ccf82c83042907..d58cfbfe11a09e20081016d74daff670708e737c 100644 --- a/lib/std/special/compiler_rt/mulodi4.zig +++ b/lib/std/special/compiler_rt/mulodi4.zig @@ -1,7 +1,5 @@ const builtin = @import("builtin"); const compiler_rt = @import("../compiler_rt.zig"); -const maxInt = std.math.maxInt; -const minInt = std.math.minInt; pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 { @setRuntimeSafety(builtin.is_test); @@ -39,6 +37,6 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 { return result; } -test "import mulodi4" { +test { _ = @import("mulodi4_test.zig"); } diff --git a/lib/std/special/compiler_rt/muloti4.zig b/lib/std/special/compiler_rt/muloti4.zig index b36a32666a5095af44f164ecd9cf7e668685dd9c..7e3497ed7bab709bb0316b0087f81de5d87ca1bd 100644 --- a/lib/std/special/compiler_rt/muloti4.zig +++ b/lib/std/special/compiler_rt/muloti4.zig @@ -44,6 +44,6 @@ pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 { return r; } -test "import muloti4" { +test { _ = @import("muloti4_test.zig"); } diff --git a/lib/std/special/compiler_rt/multi3.zig b/lib/std/special/compiler_rt/multi3.zig index 47343613300e870f94755647067b217a3b33d98d..d1c4a3b05d2c5a18e724782f3dcf02db578caaf5 100644 --- a/lib/std/special/compiler_rt/multi3.zig +++ b/lib/std/special/compiler_rt/multi3.zig @@ -59,6 +59,6 @@ const twords = extern union { }; }; -test "import multi3" { +test { _ = @import("multi3_test.zig"); } diff --git a/lib/std/special/compiler_rt/popcountdi2.zig b/lib/std/special/compiler_rt/popcountdi2.zig index b7e7220c7b8c109ab8f49e74d1b0e067e561c0fd..9835e60fbc7fd4433c262af0713b3b03087f825b 100644 --- a/lib/std/special/compiler_rt/popcountdi2.zig +++ b/lib/std/special/compiler_rt/popcountdi2.zig @@ -19,6 +19,6 @@ pub fn __popcountdi2(a: i64) callconv(.C) i32 { return @bitCast(i32, (x + (x >> 8)) & 0x0000007F); // (7 significant bits) } -test "import popcountdi2" { +test { _ = @import("popcountdi2_test.zig"); } diff --git a/lib/std/special/compiler_rt/truncXfYf2.zig b/lib/std/special/compiler_rt/truncXfYf2.zig index 737d0e330f8cfba898b92b7fc407e21999b4524a..1d0394197cc35a926b78d5ba62b47b21170cdd68 100644 --- a/lib/std/special/compiler_rt/truncXfYf2.zig +++ b/lib/std/special/compiler_rt/truncXfYf2.zig @@ -138,6 +138,6 @@ fn truncXfYf2(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t { return @bitCast(dst_t, result); } -test "import truncXfYf2" { +test { _ = @import("truncXfYf2_test.zig"); } diff --git a/lib/std/special/compiler_rt/udivmodti4.zig b/lib/std/special/compiler_rt/udivmodti4.zig index cc1141dbbca1e8f7faa7dab8ec4516602db04c0c..be9ed8237bd278cd330d9064ef5c6cce63880ae0 100644 --- a/lib/std/special/compiler_rt/udivmodti4.zig +++ b/lib/std/special/compiler_rt/udivmodti4.zig @@ -13,6 +13,6 @@ pub fn __udivmodti4_windows_x86_64(a: v128, b: v128, maybe_rem: ?*u128) callconv return @bitCast(v128, udivmod(u128, @bitCast(u128, a), @bitCast(u128, b), maybe_rem)); } -test "import udivmodti4" { +test { _ = @import("udivmodti4_test.zig"); } -- 2.54.0