mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
11 lines
236 B
Zig
11 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
|