zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

test_round_builtin.zig (214B) - Raw


      1 const expect = @import("std").testing.expect;
      2 
      3 test "@round" {
      4     try expect(@round(1.4) == 1);
      5     try expect(@round(1.5) == 2);
      6     try expect(@round(-1.4) == -1);
      7     try expect(@round(-2.5) == -3);
      8 }
      9 
     10 // test