mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 00:44:32 +01:00
10 lines
236 B
Zig
10 lines
236 B
Zig
const expectEqual = @import("std").testing.expectEqual;
|
|
|
|
test "@round" {
|
|
try expectEqual(1, @round(1.4));
|
|
try expectEqual(2, @round(1.5));
|
|
try expectEqual(-1, @round(-1.4));
|
|
try expectEqual(-3, @round(-2.5));
|
|
}
|
|
|
|
// test
|