mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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`.
17 lines
417 B
Zig
17 lines
417 B
Zig
const fixuint = @import("fixuint.zig").fixuint;
|
|
const builtin = @import("builtin");
|
|
|
|
pub fn __fixunsdfsi(a: f64) callconv(.C) u32 {
|
|
@setRuntimeSafety(builtin.is_test);
|
|
return fixuint(f64, u32, a);
|
|
}
|
|
|
|
pub fn __aeabi_d2uiz(arg: f64) callconv(.AAPCS) u32 {
|
|
@setRuntimeSafety(false);
|
|
return @call(.{ .modifier = .always_inline }, __fixunsdfsi, .{arg});
|
|
}
|
|
|
|
test {
|
|
_ = @import("fixunsdfsi_test.zig");
|
|
}
|