authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-08-30 14:43:46-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-09-01 17:54:06-07:00
loga2ff3a13fe22b5693bbd719bf4eaee06a9d6be57
tree626a60b82ce79406994ba0bb2ff61387979a4b33
parentca21cad2bf3dcd765753dc93d608e67ae3661f10

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

57 files changed, 81 insertions(+), 72 deletions(-)

lib/std/event.zig+1-1
...@@ -9,7 +9,7 @@ pub const RwLocked = @import("event/rwlocked.zig").RwLocked;...@@ -9,7 +9,7 @@ pub const RwLocked = @import("event/rwlocked.zig").RwLocked;
9pub const Loop = @import("event/loop.zig").Loop;9pub const Loop = @import("event/loop.zig").Loop;
10pub const WaitGroup = @import("event/wait_group.zig").WaitGroup;10pub const WaitGroup = @import("event/wait_group.zig").WaitGroup;
1111
12test "import event tests" {12test {
13 _ = @import("event/channel.zig");13 _ = @import("event/channel.zig");
14 _ = @import("event/future.zig");14 _ = @import("event/future.zig");
15 _ = @import("event/group.zig");15 _ = @import("event/group.zig");
lib/std/json.zig+1-1
...@@ -2657,7 +2657,7 @@ test "json.parser.dynamic" {...@@ -2657,7 +2657,7 @@ test "json.parser.dynamic" {
2657 try testing.expect(mem.eql(u8, large_int.NumberString, "18446744073709551615"));2657 try testing.expect(mem.eql(u8, large_int.NumberString, "18446744073709551615"));
2658}2658}
26592659
2660test "import more json tests" {2660test {
2661 _ = @import("json/test.zig");2661 _ = @import("json/test.zig");
2662 _ = @import("json/write_stream.zig");2662 _ = @import("json/write_stream.zig");
2663}2663}
lib/std/os/linux/arm-eabi.zig+2
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const linux = std.os.linux;3const linux = std.os.linux;
3const iovec = std.os.iovec;4const iovec = std.os.iovec;
4const iovec_const = std.os.iovec_const;5const iovec_const = std.os.iovec_const;
...@@ -8,6 +9,7 @@ const sigset_t = linux.sigset_t;...@@ -8,6 +9,7 @@ const sigset_t = linux.sigset_t;
8const uid_t = linux.uid_t;9const uid_t = linux.uid_t;
9const gid_t = linux.gid_t;10const gid_t = linux.gid_t;
10const pid_t = linux.pid_t;11const pid_t = linux.pid_t;
12const sockaddr = linux.sockaddr;
1113
12pub fn syscall0(number: SYS) usize {14pub fn syscall0(number: SYS) usize {
13 return asm volatile ("svc #0"15 return asm volatile ("svc #0"
lib/std/os/linux/arm64.zig+1
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const linux = std.os.linux;3const linux = std.os.linux;
3const socklen_t = linux.socklen_t;4const socklen_t = linux.socklen_t;
4const sockaddr = linux.sockaddr;5const sockaddr = linux.sockaddr;
lib/std/os/linux/bpf.zig+10-5
...@@ -5,6 +5,11 @@ const expectEqual = std.testing.expectEqual;...@@ -5,6 +5,11 @@ const expectEqual = std.testing.expectEqual;
5const expectError = std.testing.expectError;5const expectError = std.testing.expectError;
6const expect = std.testing.expect;6const expect = std.testing.expect;
77
8const linux = std.os.linux;
9const fd_t = linux.fd_t;
10const pid_t = linux.pid_t;
11const getErrno = linux.getErrno;
12
8pub const btf = @import("bpf/btf.zig");13pub const btf = @import("bpf/btf.zig");
9pub const kern = @import("bpf/kern.zig");14pub const kern = @import("bpf/kern.zig");
1015
...@@ -1501,7 +1506,7 @@ pub fn map_create(map_type: MapType, key_size: u32, value_size: u32, max_entries...@@ -1501,7 +1506,7 @@ pub fn map_create(map_type: MapType, key_size: u32, value_size: u32, max_entries
1501 attr.map_create.value_size = value_size;1506 attr.map_create.value_size = value_size;
1502 attr.map_create.max_entries = max_entries;1507 attr.map_create.max_entries = max_entries;
15031508
1504 const rc = bpf(.map_create, &attr, @sizeOf(MapCreateAttr));1509 const rc = linux.bpf(.map_create, &attr, @sizeOf(MapCreateAttr));
1505 switch (errno(rc)) {1510 switch (errno(rc)) {
1506 .SUCCESS => return @intCast(fd_t, rc),1511 .SUCCESS => return @intCast(fd_t, rc),
1507 .INVAL => return error.MapTypeOrAttrInvalid,1512 .INVAL => return error.MapTypeOrAttrInvalid,
...@@ -1525,7 +1530,7 @@ pub fn map_lookup_elem(fd: fd_t, key: []const u8, value: []u8) !void {...@@ -1525,7 +1530,7 @@ pub fn map_lookup_elem(fd: fd_t, key: []const u8, value: []u8) !void {
1525 attr.map_elem.key = @ptrToInt(key.ptr);1530 attr.map_elem.key = @ptrToInt(key.ptr);
1526 attr.map_elem.result.value = @ptrToInt(value.ptr);1531 attr.map_elem.result.value = @ptrToInt(value.ptr);
15271532
1528 const rc = bpf(.map_lookup_elem, &attr, @sizeOf(MapElemAttr));1533 const rc = linux.bpf(.map_lookup_elem, &attr, @sizeOf(MapElemAttr));
1529 switch (errno(rc)) {1534 switch (errno(rc)) {
1530 .SUCCESS => return,1535 .SUCCESS => return,
1531 .BADF => return error.BadFd,1536 .BADF => return error.BadFd,
...@@ -1547,7 +1552,7 @@ pub fn map_update_elem(fd: fd_t, key: []const u8, value: []const u8, flags: u64)...@@ -1547,7 +1552,7 @@ pub fn map_update_elem(fd: fd_t, key: []const u8, value: []const u8, flags: u64)
1547 attr.map_elem.result = .{ .value = @ptrToInt(value.ptr) };1552 attr.map_elem.result = .{ .value = @ptrToInt(value.ptr) };
1548 attr.map_elem.flags = flags;1553 attr.map_elem.flags = flags;
15491554
1550 const rc = bpf(.map_update_elem, &attr, @sizeOf(MapElemAttr));1555 const rc = linux.bpf(.map_update_elem, &attr, @sizeOf(MapElemAttr));
1551 switch (errno(rc)) {1556 switch (errno(rc)) {
1552 .SUCCESS => return,1557 .SUCCESS => return,
1553 .@"2BIG" => return error.ReachedMaxEntries,1558 .@"2BIG" => return error.ReachedMaxEntries,
...@@ -1568,7 +1573,7 @@ pub fn map_delete_elem(fd: fd_t, key: []const u8) !void {...@@ -1568,7 +1573,7 @@ pub fn map_delete_elem(fd: fd_t, key: []const u8) !void {
1568 attr.map_elem.map_fd = fd;1573 attr.map_elem.map_fd = fd;
1569 attr.map_elem.key = @ptrToInt(key.ptr);1574 attr.map_elem.key = @ptrToInt(key.ptr);
15701575
1571 const rc = bpf(.map_delete_elem, &attr, @sizeOf(MapElemAttr));1576 const rc = linux.bpf(.map_delete_elem, &attr, @sizeOf(MapElemAttr));
1572 switch (errno(rc)) {1577 switch (errno(rc)) {
1573 .SUCCESS => return,1578 .SUCCESS => return,
1574 .BADF => return error.BadFd,1579 .BADF => return error.BadFd,
...@@ -1631,7 +1636,7 @@ pub fn prog_load(...@@ -1631,7 +1636,7 @@ pub fn prog_load(
1631 attr.prog_load.log_level = l.level;1636 attr.prog_load.log_level = l.level;
1632 }1637 }
16331638
1634 const rc = bpf(.prog_load, &attr, @sizeOf(ProgLoadAttr));1639 const rc = linux.bpf(.prog_load, &attr, @sizeOf(ProgLoadAttr));
1635 return switch (errno(rc)) {1640 return switch (errno(rc)) {
1636 .SUCCESS => @intCast(fd_t, rc),1641 .SUCCESS => @intCast(fd_t, rc),
1637 .ACCES => error.UnsafeProgram,1642 .ACCES => error.UnsafeProgram,
lib/std/os/linux/bpf/btf.zig+2
...@@ -1,3 +1,5 @@...@@ -1,3 +1,5 @@
1const std = @import("../../../std.zig");
2
1const magic = 0xeb9f;3const magic = 0xeb9f;
2const version = 1;4const version = 1;
35
lib/std/os/linux/bpf/helpers.zig+5
...@@ -1,5 +1,10 @@...@@ -1,5 +1,10 @@
1const std = @import("../../../std.zig");
1const kern = @import("kern.zig");2const kern = @import("kern.zig");
23
4const PtRegs = @compileError("TODO missing os bits: PtRegs");
5const TcpHdr = @compileError("TODO missing os bits: TcpHdr");
6const SkFullSock = @compileError("TODO missing os bits: SkFullSock");
7
3// in BPF, all the helper calls8// in BPF, all the helper calls
4// TODO: when https://github.com/ziglang/zig/issues/1717 is here, make a nice9// TODO: when https://github.com/ziglang/zig/issues/1717 is here, make a nice
5// function that uses the Helper enum10// function that uses the Helper enum
lib/std/os/linux/i386.zig+7-17
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const linux = std.os.linux;3const linux = std.os.linux;
3const socklen_t = linux.socklen_t;4const socklen_t = linux.socklen_t;
4const iovec = linux.iovec;5const iovec = linux.iovec;
...@@ -8,6 +9,7 @@ const gid_t = linux.gid_t;...@@ -8,6 +9,7 @@ const gid_t = linux.gid_t;
8const pid_t = linux.pid_t;9const pid_t = linux.pid_t;
9const stack_t = linux.stack_t;10const stack_t = linux.stack_t;
10const sigset_t = linux.sigset_t;11const sigset_t = linux.sigset_t;
12const sockaddr = linux.sockaddr;
1113
12pub fn syscall0(number: SYS) usize {14pub fn syscall0(number: SYS) usize {
13 return asm volatile ("int $0x80"15 return asm volatile ("int $0x80"
...@@ -628,40 +630,28 @@ pub const LOCK = struct {...@@ -628,40 +630,28 @@ pub const LOCK = struct {
628pub const MAP = struct {630pub const MAP = struct {
629 /// Share changes631 /// Share changes
630 pub const SHARED = 0x01;632 pub const SHARED = 0x01;
631
632 /// Changes are private633 /// Changes are private
633 pub const PRIVATE = 0x02;634 pub const PRIVATE = 0x02;
634
635 /// share + validate extension flags635 /// share + validate extension flags
636 pub const SHARED_VALIDATE = 0x03;636 pub const SHARED_VALIDATE = 0x03;
637
638 /// Mask for type of mapping637 /// Mask for type of mapping
639 pub const TYPE = 0x0f;638 pub const TYPE = 0x0f;
640
641 /// Interpret addr exactly639 /// Interpret addr exactly
642 pub const FIXED = 0x10;640 pub const FIXED = 0x10;
643
644 /// don't use a file641 /// don't use a file
645 pub const ANONYMOUS = if (is_mips) 0x800 else 0x20;642 pub const ANONYMOUS = 0x20;
646
647 /// populate (prefault) pagetables643 /// populate (prefault) pagetables
648 pub const POPULATE = if (is_mips) 0x10000 else 0x8000;644 pub const POPULATE = 0x8000;
649
650 /// do not block on IO645 /// do not block on IO
651 pub const NONBLOCK = if (is_mips) 0x20000 else 0x10000;646 pub const NONBLOCK = 0x10000;
652
653 /// give out an address that is best suited for process/thread stacks647 /// give out an address that is best suited for process/thread stacks
654 pub const STACK = if (is_mips) 0x40000 else 0x20000;648 pub const STACK = 0x20000;
655
656 /// create a huge page mapping649 /// create a huge page mapping
657 pub const HUGETLB = if (is_mips) 0x80000 else 0x40000;650 pub const HUGETLB = 0x40000;
658
659 /// perform synchronous page faults for the mapping651 /// perform synchronous page faults for the mapping
660 pub const SYNC = 0x80000;652 pub const SYNC = 0x80000;
661
662 /// FIXED which doesn't unmap underlying mapping653 /// FIXED which doesn't unmap underlying mapping
663 pub const FIXED_NOREPLACE = 0x100000;654 pub const FIXED_NOREPLACE = 0x100000;
664
665 /// For anonymous mmap, memory could be uninitialized655 /// For anonymous mmap, memory could be uninitialized
666 pub const UNINITIALIZED = 0x4000000;656 pub const UNINITIALIZED = 0x4000000;
667657
lib/std/os/linux/mips.zig+1
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const linux = std.os.linux;3const linux = std.os.linux;
3const socklen_t = linux.socklen_t;4const socklen_t = linux.socklen_t;
4const iovec = linux.iovec;5const iovec = linux.iovec;
lib/std/os/linux/powerpc.zig+2
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const linux = std.os.linux;3const linux = std.os.linux;
3const socklen_t = linux.socklen_t;4const socklen_t = linux.socklen_t;
4const iovec = linux.iovec;5const iovec = linux.iovec;
...@@ -8,6 +9,7 @@ const gid_t = linux.gid_t;...@@ -8,6 +9,7 @@ const gid_t = linux.gid_t;
8const pid_t = linux.pid_t;9const pid_t = linux.pid_t;
9const stack_t = linux.stack_t;10const stack_t = linux.stack_t;
10const sigset_t = linux.sigset_t;11const sigset_t = linux.sigset_t;
12const sockaddr = linux.sockaddr;
1113
12pub fn syscall0(number: SYS) usize {14pub fn syscall0(number: SYS) usize {
13 return asm volatile (15 return asm volatile (
lib/std/os/linux/powerpc64.zig+2
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const linux = std.os.linux;3const linux = std.os.linux;
3const socklen_t = linux.socklen_t;4const socklen_t = linux.socklen_t;
4const iovec = linux.iovec;5const iovec = linux.iovec;
...@@ -8,6 +9,7 @@ const gid_t = linux.gid_t;...@@ -8,6 +9,7 @@ const gid_t = linux.gid_t;
8const pid_t = linux.pid_t;9const pid_t = linux.pid_t;
9const stack_t = linux.stack_t;10const stack_t = linux.stack_t;
10const sigset_t = linux.sigset_t;11const sigset_t = linux.sigset_t;
12const sockaddr = linux.sockaddr;
1113
12pub fn syscall0(number: SYS) usize {14pub fn syscall0(number: SYS) usize {
13 return asm volatile (15 return asm volatile (
lib/std/os/linux/sparc64.zig+1
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../std.zig");1const std = @import("../../std.zig");
2const maxInt = std.math.maxInt;
2const pid_t = linux.pid_t;3const pid_t = linux.pid_t;
3const uid_t = linux.uid_t;4const uid_t = linux.uid_t;
4const clock_t = linux.clock_t;5const clock_t = linux.clock_t;
lib/std/special/compiler_rt/addXf3.zig+1-1
...@@ -225,6 +225,6 @@ fn addXf3(comptime T: type, a: T, b: T) T {...@@ -225,6 +225,6 @@ fn addXf3(comptime T: type, a: T, b: T) T {
225 return @bitCast(T, result);225 return @bitCast(T, result);
226}226}
227227
228test "import addXf3" {228test {
229 _ = @import("addXf3_test.zig");229 _ = @import("addXf3_test.zig");
230}230}
lib/std/special/compiler_rt/divdf3.zig+1-1
...@@ -327,6 +327,6 @@ pub fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 {...@@ -327,6 +327,6 @@ pub fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 {
327 return @call(.{ .modifier = .always_inline }, __divdf3, .{ a, b });327 return @call(.{ .modifier = .always_inline }, __divdf3, .{ a, b });
328}328}
329329
330test "import divdf3" {330test {
331 _ = @import("divdf3_test.zig");331 _ = @import("divdf3_test.zig");
332}332}
lib/std/special/compiler_rt/divsf3.zig+1-1
...@@ -200,6 +200,6 @@ pub fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 {...@@ -200,6 +200,6 @@ pub fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 {
200 return @call(.{ .modifier = .always_inline }, __divsf3, .{ a, b });200 return @call(.{ .modifier = .always_inline }, __divsf3, .{ a, b });
201}201}
202202
203test "import divsf3" {203test {
204 _ = @import("divsf3_test.zig");204 _ = @import("divsf3_test.zig");
205}205}
lib/std/special/compiler_rt/divtf3.zig+1-1
...@@ -221,6 +221,6 @@ pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 {...@@ -221,6 +221,6 @@ pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 {
221 }221 }
222}222}
223223
224test "import divtf3" {224test {
225 _ = @import("divtf3_test.zig");225 _ = @import("divtf3_test.zig");
226}226}
lib/std/special/compiler_rt/divti3.zig+1-1
...@@ -23,6 +23,6 @@ pub fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 {...@@ -23,6 +23,6 @@ pub fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 {
23 }));23 }));
24}24}
2525
26test "import divti3" {26test {
27 _ = @import("divti3_test.zig");27 _ = @import("divti3_test.zig");
28}28}
lib/std/special/compiler_rt/extendXfYf2.zig+1-1
...@@ -104,6 +104,6 @@ fn extendXfYf2(comptime dst_t: type, comptime src_t: type, a: std.meta.Int(.unsi...@@ -104,6 +104,6 @@ fn extendXfYf2(comptime dst_t: type, comptime src_t: type, a: std.meta.Int(.unsi
104 return @bitCast(dst_t, result);104 return @bitCast(dst_t, result);
105}105}
106106
107test "import extendXfYf2" {107test {
108 _ = @import("extendXfYf2_test.zig");108 _ = @import("extendXfYf2_test.zig");
109}109}
lib/std/special/compiler_rt/fixdfdi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_d2lz(arg: f64) callconv(.AAPCS) i64 {...@@ -11,6 +11,6 @@ pub fn __aeabi_d2lz(arg: f64) callconv(.AAPCS) i64 {
11 return @call(.{ .modifier = .always_inline }, __fixdfdi, .{arg});11 return @call(.{ .modifier = .always_inline }, __fixdfdi, .{arg});
12}12}
1313
14test "import fixdfdi" {14test {
15 _ = @import("fixdfdi_test.zig");15 _ = @import("fixdfdi_test.zig");
16}16}
lib/std/special/compiler_rt/fixdfsi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_d2iz(a: f64) callconv(.AAPCS) i32 {...@@ -11,6 +11,6 @@ pub fn __aeabi_d2iz(a: f64) callconv(.AAPCS) i32 {
11 return @call(.{ .modifier = .always_inline }, __fixdfsi, .{a});11 return @call(.{ .modifier = .always_inline }, __fixdfsi, .{a});
12}12}
1313
14test "import fixdfsi" {14test {
15 _ = @import("fixdfsi_test.zig");15 _ = @import("fixdfsi_test.zig");
16}16}
lib/std/special/compiler_rt/fixdfti.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixdfti(a: f64) callconv(.C) i128 {...@@ -6,6 +6,6 @@ pub fn __fixdfti(a: f64) callconv(.C) i128 {
6 return fixint(f64, i128, a);6 return fixint(f64, i128, a);
7}7}
88
9test "import fixdfti" {9test {
10 _ = @import("fixdfti_test.zig");10 _ = @import("fixdfti_test.zig");
11}11}
lib/std/special/compiler_rt/fixint.zig+1-1
...@@ -70,6 +70,6 @@ pub fn fixint(comptime fp_t: type, comptime fixint_t: type, a: fp_t) fixint_t {...@@ -70,6 +70,6 @@ pub fn fixint(comptime fp_t: type, comptime fixint_t: type, a: fp_t) fixint_t {
70 }70 }
71}71}
7272
73test "import fixint" {73test {
74 _ = @import("fixint_test.zig");74 _ = @import("fixint_test.zig");
75}75}
lib/std/special/compiler_rt/fixsfdi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_f2lz(arg: f32) callconv(.AAPCS) i64 {...@@ -11,6 +11,6 @@ pub fn __aeabi_f2lz(arg: f32) callconv(.AAPCS) i64 {
11 return @call(.{ .modifier = .always_inline }, __fixsfdi, .{arg});11 return @call(.{ .modifier = .always_inline }, __fixsfdi, .{arg});
12}12}
1313
14test "import fixsfdi" {14test {
15 _ = @import("fixsfdi_test.zig");15 _ = @import("fixsfdi_test.zig");
16}16}
lib/std/special/compiler_rt/fixsfsi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 {...@@ -11,6 +11,6 @@ pub fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 {
11 return @call(.{ .modifier = .always_inline }, __fixsfsi, .{a});11 return @call(.{ .modifier = .always_inline }, __fixsfsi, .{a});
12}12}
1313
14test "import fixsfsi" {14test {
15 _ = @import("fixsfsi_test.zig");15 _ = @import("fixsfsi_test.zig");
16}16}
lib/std/special/compiler_rt/fixsfti.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixsfti(a: f32) callconv(.C) i128 {...@@ -6,6 +6,6 @@ pub fn __fixsfti(a: f32) callconv(.C) i128 {
6 return fixint(f32, i128, a);6 return fixint(f32, i128, a);
7}7}
88
9test "import fixsfti" {9test {
10 _ = @import("fixsfti_test.zig");10 _ = @import("fixsfti_test.zig");
11}11}
lib/std/special/compiler_rt/fixtfdi.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixtfdi(a: f128) callconv(.C) i64 {...@@ -6,6 +6,6 @@ pub fn __fixtfdi(a: f128) callconv(.C) i64 {
6 return fixint(f128, i64, a);6 return fixint(f128, i64, a);
7}7}
88
9test "import fixtfdi" {9test {
10 _ = @import("fixtfdi_test.zig");10 _ = @import("fixtfdi_test.zig");
11}11}
lib/std/special/compiler_rt/fixtfsi.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixtfsi(a: f128) callconv(.C) i32 {...@@ -6,6 +6,6 @@ pub fn __fixtfsi(a: f128) callconv(.C) i32 {
6 return fixint(f128, i32, a);6 return fixint(f128, i32, a);
7}7}
88
9test "import fixtfsi" {9test {
10 _ = @import("fixtfsi_test.zig");10 _ = @import("fixtfsi_test.zig");
11}11}
lib/std/special/compiler_rt/fixtfti.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixtfti(a: f128) callconv(.C) i128 {...@@ -6,6 +6,6 @@ pub fn __fixtfti(a: f128) callconv(.C) i128 {
6 return fixint(f128, i128, a);6 return fixint(f128, i128, a);
7}7}
88
9test "import fixtfti" {9test {
10 _ = @import("fixtfti_test.zig");10 _ = @import("fixtfti_test.zig");
11}11}
lib/std/special/compiler_rt/fixunsdfdi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 {...@@ -11,6 +11,6 @@ pub fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 {
11 return @call(.{ .modifier = .always_inline }, __fixunsdfdi, .{a});11 return @call(.{ .modifier = .always_inline }, __fixunsdfdi, .{a});
12}12}
1313
14test "import fixunsdfdi" {14test {
15 _ = @import("fixunsdfdi_test.zig");15 _ = @import("fixunsdfdi_test.zig");
16}16}
lib/std/special/compiler_rt/fixunsdfsi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_d2uiz(arg: f64) callconv(.AAPCS) u32 {...@@ -11,6 +11,6 @@ pub fn __aeabi_d2uiz(arg: f64) callconv(.AAPCS) u32 {
11 return @call(.{ .modifier = .always_inline }, __fixunsdfsi, .{arg});11 return @call(.{ .modifier = .always_inline }, __fixunsdfsi, .{arg});
12}12}
1313
14test "import fixunsdfsi" {14test {
15 _ = @import("fixunsdfsi_test.zig");15 _ = @import("fixunsdfsi_test.zig");
16}16}
lib/std/special/compiler_rt/fixunsdfti.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixunsdfti(a: f64) callconv(.C) u128 {...@@ -6,6 +6,6 @@ pub fn __fixunsdfti(a: f64) callconv(.C) u128 {
6 return fixuint(f64, u128, a);6 return fixuint(f64, u128, a);
7}7}
88
9test "import fixunsdfti" {9test {
10 _ = @import("fixunsdfti_test.zig");10 _ = @import("fixunsdfti_test.zig");
11}11}
lib/std/special/compiler_rt/fixunssfdi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_f2ulz(a: f32) callconv(.AAPCS) u64 {...@@ -11,6 +11,6 @@ pub fn __aeabi_f2ulz(a: f32) callconv(.AAPCS) u64 {
11 return @call(.{ .modifier = .always_inline }, __fixunssfdi, .{a});11 return @call(.{ .modifier = .always_inline }, __fixunssfdi, .{a});
12}12}
1313
14test "import fixunssfdi" {14test {
15 _ = @import("fixunssfdi_test.zig");15 _ = @import("fixunssfdi_test.zig");
16}16}
lib/std/special/compiler_rt/fixunssfsi.zig+1-1
...@@ -11,6 +11,6 @@ pub fn __aeabi_f2uiz(a: f32) callconv(.AAPCS) u32 {...@@ -11,6 +11,6 @@ pub fn __aeabi_f2uiz(a: f32) callconv(.AAPCS) u32 {
11 return @call(.{ .modifier = .always_inline }, __fixunssfsi, .{a});11 return @call(.{ .modifier = .always_inline }, __fixunssfsi, .{a});
12}12}
1313
14test "import fixunssfsi" {14test {
15 _ = @import("fixunssfsi_test.zig");15 _ = @import("fixunssfsi_test.zig");
16}16}
lib/std/special/compiler_rt/fixunssfti.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixunssfti(a: f32) callconv(.C) u128 {...@@ -6,6 +6,6 @@ pub fn __fixunssfti(a: f32) callconv(.C) u128 {
6 return fixuint(f32, u128, a);6 return fixuint(f32, u128, a);
7}7}
88
9test "import fixunssfti" {9test {
10 _ = @import("fixunssfti_test.zig");10 _ = @import("fixunssfti_test.zig");
11}11}
lib/std/special/compiler_rt/fixunstfdi.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixunstfdi(a: f128) callconv(.C) u64 {...@@ -6,6 +6,6 @@ pub fn __fixunstfdi(a: f128) callconv(.C) u64 {
6 return fixuint(f128, u64, a);6 return fixuint(f128, u64, a);
7}7}
88
9test "import fixunstfdi" {9test {
10 _ = @import("fixunstfdi_test.zig");10 _ = @import("fixunstfdi_test.zig");
11}11}
lib/std/special/compiler_rt/fixunstfsi.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixunstfsi(a: f128) callconv(.C) u32 {...@@ -6,6 +6,6 @@ pub fn __fixunstfsi(a: f128) callconv(.C) u32 {
6 return fixuint(f128, u32, a);6 return fixuint(f128, u32, a);
7}7}
88
9test "import fixunstfsi" {9test {
10 _ = @import("fixunstfsi_test.zig");10 _ = @import("fixunstfsi_test.zig");
11}11}
lib/std/special/compiler_rt/fixunstfti.zig+1-1
...@@ -6,6 +6,6 @@ pub fn __fixunstfti(a: f128) callconv(.C) u128 {...@@ -6,6 +6,6 @@ pub fn __fixunstfti(a: f128) callconv(.C) u128 {
6 return fixuint(f128, u128, a);6 return fixuint(f128, u128, a);
7}7}
88
9test "import fixunstfti" {9test {
10 _ = @import("fixunstfti_test.zig");10 _ = @import("fixunstfti_test.zig");
11}11}
lib/std/special/compiler_rt/floatXisf.zig+2-2
...@@ -85,9 +85,9 @@ pub fn __aeabi_l2f(arg: i64) callconv(.AAPCS) f32 {...@@ -85,9 +85,9 @@ pub fn __aeabi_l2f(arg: i64) callconv(.AAPCS) f32 {
85 return @call(.{ .modifier = .always_inline }, __floatdisf, .{arg});85 return @call(.{ .modifier = .always_inline }, __floatdisf, .{arg});
86}86}
8787
88test "import floattisf" {88test {
89 _ = @import("floattisf_test.zig");89 _ = @import("floattisf_test.zig");
90}90}
91test "import floatdisf" {91test {
92 _ = @import("floattisf_test.zig");92 _ = @import("floattisf_test.zig");
93}93}
lib/std/special/compiler_rt/floatdidf.zig+1-1
...@@ -22,6 +22,6 @@ pub fn __aeabi_l2d(arg: i64) callconv(.AAPCS) f64 {...@@ -22,6 +22,6 @@ pub fn __aeabi_l2d(arg: i64) callconv(.AAPCS) f64 {
22 return @call(.{ .modifier = .always_inline }, __floatdidf, .{arg});22 return @call(.{ .modifier = .always_inline }, __floatdidf, .{arg});
23}23}
2424
25test "import floatdidf" {25test {
26 _ = @import("floatdidf_test.zig");26 _ = @import("floatdidf_test.zig");
27}27}
lib/std/special/compiler_rt/floatditf.zig+1-1
...@@ -33,6 +33,6 @@ pub fn __floatditf(arg: i64) callconv(.C) f128 {...@@ -33,6 +33,6 @@ pub fn __floatditf(arg: i64) callconv(.C) f128 {
33 return @bitCast(f128, result | sign);33 return @bitCast(f128, result | sign);
34}34}
3535
36test "import floatditf" {36test {
37 _ = @import("floatditf_test.zig");37 _ = @import("floatditf_test.zig");
38}38}
lib/std/special/compiler_rt/floattidf.zig+1-1
...@@ -66,6 +66,6 @@ pub fn __floattidf(arg: i128) callconv(.C) f64 {...@@ -66,6 +66,6 @@ pub fn __floattidf(arg: i128) callconv(.C) f64 {
66 return @bitCast(f64, low | (high << 32));66 return @bitCast(f64, low | (high << 32));
67}67}
6868
69test "import floattidf" {69test {
70 _ = @import("floattidf_test.zig");70 _ = @import("floattidf_test.zig");
71}71}
lib/std/special/compiler_rt/floattitf.zig+1-1
...@@ -66,6 +66,6 @@ pub fn __floattitf(arg: i128) callconv(.C) f128 {...@@ -66,6 +66,6 @@ pub fn __floattitf(arg: i128) callconv(.C) f128 {
66 return @bitCast(f128, low | (high << 64));66 return @bitCast(f128, low | (high << 64));
67}67}
6868
69test "import floattitf" {69test {
70 _ = @import("floattitf_test.zig");70 _ = @import("floattitf_test.zig");
71}71}
lib/std/special/compiler_rt/floatundidf.zig+1-1
...@@ -24,6 +24,6 @@ pub fn __aeabi_ul2d(arg: u64) callconv(.AAPCS) f64 {...@@ -24,6 +24,6 @@ pub fn __aeabi_ul2d(arg: u64) callconv(.AAPCS) f64 {
24 return @call(.{ .modifier = .always_inline }, __floatundidf, .{arg});24 return @call(.{ .modifier = .always_inline }, __floatundidf, .{arg});
25}25}
2626
27test "import floatundidf" {27test {
28 _ = @import("floatundidf_test.zig");28 _ = @import("floatundidf_test.zig");
29}29}
lib/std/special/compiler_rt/floatunditf.zig+1-1
...@@ -23,6 +23,6 @@ pub fn __floatunditf(a: u64) callconv(.C) f128 {...@@ -23,6 +23,6 @@ pub fn __floatunditf(a: u64) callconv(.C) f128 {
23 return @bitCast(f128, result);23 return @bitCast(f128, result);
24}24}
2525
26test "import floatunditf" {26test {
27 _ = @import("floatunditf_test.zig");27 _ = @import("floatunditf_test.zig");
28}28}
lib/std/special/compiler_rt/floatunsitf.zig+1-1
...@@ -24,6 +24,6 @@ pub fn __floatunsitf(a: u32) callconv(.C) f128 {...@@ -24,6 +24,6 @@ pub fn __floatunsitf(a: u32) callconv(.C) f128 {
24 return @bitCast(f128, result);24 return @bitCast(f128, result);
25}25}
2626
27test "import floatunsitf" {27test {
28 _ = @import("floatunsitf_test.zig");28 _ = @import("floatunsitf_test.zig");
29}29}
lib/std/special/compiler_rt/floatuntidf.zig+1-1
...@@ -57,6 +57,6 @@ pub fn __floatuntidf(arg: u128) callconv(.C) f64 {...@@ -57,6 +57,6 @@ pub fn __floatuntidf(arg: u128) callconv(.C) f64 {
57 return @bitCast(f64, low | (high << 32));57 return @bitCast(f64, low | (high << 32));
58}58}
5959
60test "import floatuntidf" {60test {
61 _ = @import("floatuntidf_test.zig");61 _ = @import("floatuntidf_test.zig");
62}62}
lib/std/special/compiler_rt/floatuntisf.zig+1-1
...@@ -56,6 +56,6 @@ pub fn __floatuntisf(arg: u128) callconv(.C) f32 {...@@ -56,6 +56,6 @@ pub fn __floatuntisf(arg: u128) callconv(.C) f32 {
56 return @bitCast(f32, high | low);56 return @bitCast(f32, high | low);
57}57}
5858
59test "import floatuntisf" {59test {
60 _ = @import("floatuntisf_test.zig");60 _ = @import("floatuntisf_test.zig");
61}61}
lib/std/special/compiler_rt/floatuntitf.zig+1-1
...@@ -57,6 +57,6 @@ pub fn __floatuntitf(arg: u128) callconv(.C) f128 {...@@ -57,6 +57,6 @@ pub fn __floatuntitf(arg: u128) callconv(.C) f128 {
57 return @bitCast(f128, low | (high << 64));57 return @bitCast(f128, low | (high << 64));
58}58}
5959
60test "import floatuntitf" {60test {
61 _ = @import("floatuntitf_test.zig");61 _ = @import("floatuntitf_test.zig");
62}62}
lib/std/special/compiler_rt/modti3.zig+1-1
...@@ -28,6 +28,6 @@ pub fn __modti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 {...@@ -28,6 +28,6 @@ pub fn __modti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 {
28 }));28 }));
29}29}
3030
31test "import modti3" {31test {
32 _ = @import("modti3_test.zig");32 _ = @import("modti3_test.zig");
33}33}
lib/std/special/compiler_rt/mulXf3.zig+1-1
...@@ -294,6 +294,6 @@ fn wideRightShiftWithSticky(comptime Z: type, hi: *Z, lo: *Z, count: u32) void {...@@ -294,6 +294,6 @@ fn wideRightShiftWithSticky(comptime Z: type, hi: *Z, lo: *Z, count: u32) void {
294 }294 }
295}295}
296296
297test "import mulXf3" {297test {
298 _ = @import("mulXf3_test.zig");298 _ = @import("mulXf3_test.zig");
299}299}
lib/std/special/compiler_rt/muldi3.zig+1-1
...@@ -51,6 +51,6 @@ pub fn __muldi3(a: i64, b: i64) callconv(.C) i64 {...@@ -51,6 +51,6 @@ pub fn __muldi3(a: i64, b: i64) callconv(.C) i64 {
51 return r.all;51 return r.all;
52}52}
5353
54test "import muldi3" {54test {
55 _ = @import("muldi3_test.zig");55 _ = @import("muldi3_test.zig");
56}56}
lib/std/special/compiler_rt/mulodi4.zig+1-3
...@@ -1,7 +1,5 @@...@@ -1,7 +1,5 @@
1const builtin = @import("builtin");1const builtin = @import("builtin");
2const compiler_rt = @import("../compiler_rt.zig");2const compiler_rt = @import("../compiler_rt.zig");
3const maxInt = std.math.maxInt;
4const minInt = std.math.minInt;
53
6pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {4pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {
7 @setRuntimeSafety(builtin.is_test);5 @setRuntimeSafety(builtin.is_test);
...@@ -39,6 +37,6 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {...@@ -39,6 +37,6 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {
39 return result;37 return result;
40}38}
4139
42test "import mulodi4" {40test {
43 _ = @import("mulodi4_test.zig");41 _ = @import("mulodi4_test.zig");
44}42}
lib/std/special/compiler_rt/muloti4.zig+1-1
...@@ -44,6 +44,6 @@ pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 {...@@ -44,6 +44,6 @@ pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 {
44 return r;44 return r;
45}45}
4646
47test "import muloti4" {47test {
48 _ = @import("muloti4_test.zig");48 _ = @import("muloti4_test.zig");
49}49}
lib/std/special/compiler_rt/multi3.zig+1-1
...@@ -59,6 +59,6 @@ const twords = extern union {...@@ -59,6 +59,6 @@ const twords = extern union {
59 };59 };
60};60};
6161
62test "import multi3" {62test {
63 _ = @import("multi3_test.zig");63 _ = @import("multi3_test.zig");
64}64}
lib/std/special/compiler_rt/popcountdi2.zig+1-1
...@@ -19,6 +19,6 @@ pub fn __popcountdi2(a: i64) callconv(.C) i32 {...@@ -19,6 +19,6 @@ pub fn __popcountdi2(a: i64) callconv(.C) i32 {
19 return @bitCast(i32, (x + (x >> 8)) & 0x0000007F); // (7 significant bits)19 return @bitCast(i32, (x + (x >> 8)) & 0x0000007F); // (7 significant bits)
20}20}
2121
22test "import popcountdi2" {22test {
23 _ = @import("popcountdi2_test.zig");23 _ = @import("popcountdi2_test.zig");
24}24}
lib/std/special/compiler_rt/truncXfYf2.zig+1-1
...@@ -138,6 +138,6 @@ fn truncXfYf2(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t {...@@ -138,6 +138,6 @@ fn truncXfYf2(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t {
138 return @bitCast(dst_t, result);138 return @bitCast(dst_t, result);
139}139}
140140
141test "import truncXfYf2" {141test {
142 _ = @import("truncXfYf2_test.zig");142 _ = @import("truncXfYf2_test.zig");
143}143}
lib/std/special/compiler_rt/udivmodti4.zig+1-1
...@@ -13,6 +13,6 @@ pub fn __udivmodti4_windows_x86_64(a: v128, b: v128, maybe_rem: ?*u128) callconv...@@ -13,6 +13,6 @@ pub fn __udivmodti4_windows_x86_64(a: v128, b: v128, maybe_rem: ?*u128) callconv
13 return @bitCast(v128, udivmod(u128, @bitCast(u128, a), @bitCast(u128, b), maybe_rem));13 return @bitCast(v128, udivmod(u128, @bitCast(u128, a), @bitCast(u128, b), maybe_rem));
14}14}
1515
16test "import udivmodti4" {16test {
17 _ = @import("udivmodti4_test.zig");17 _ = @import("udivmodti4_test.zig");
18}18}