mirror of
https://github.com/ziglang/zig.git
synced 2025-12-07 14:53:08 +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
399 B
Zig
17 lines
399 B
Zig
const fixint = @import("fixint.zig").fixint;
|
|
const builtin = @import("builtin");
|
|
|
|
pub fn __fixsfsi(a: f32) callconv(.C) i32 {
|
|
@setRuntimeSafety(builtin.is_test);
|
|
return fixint(f32, i32, a);
|
|
}
|
|
|
|
pub fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 {
|
|
@setRuntimeSafety(false);
|
|
return @call(.{ .modifier = .always_inline }, __fixsfsi, .{a});
|
|
}
|
|
|
|
test {
|
|
_ = @import("fixsfsi_test.zig");
|
|
}
|