File: test_float_allocation.ml

package info (click to toggle)
janest-base 0.17.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,632 kB
  • sloc: ml: 48,653; ansic: 281; javascript: 126; makefile: 14
file content (10 lines) | stat: -rw-r--r-- 257 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
open! Base
open Stdio
open Float

let%expect_test "iround_nearest_exn noalloc" =
  let t = Sys.opaque_identity 205.414 in
  Expect_test_helpers_core.require_no_allocation [%here] (fun () -> iround_nearest_exn t)
  |> printf "%d\n";
  [%expect {| 205 |}]
;;