• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbarbin / fingerboard / 79

22 Aug 2024 10:58AM UTC coverage: 96.228% (+0.08%) from 96.151%
79

push

github

mbarbin
Improve coverage

1 of 2 new or added lines in 1 file covered. (50.0%)

3521 of 3659 relevant lines covered (96.23%)

19717.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/frequency.ml
1
(**********************************************************************************)
2
(*  Fingerboard - a microtonal geography of the cello fingerboard                 *)
3
(*  Copyright (C) 2022-2024 Mathieu Barbin <mathieu.barbin@gmail.com>             *)
4
(*                                                                                *)
5
(*  This file is part of Fingerboard.                                             *)
6
(*                                                                                *)
7
(*  Fingerboard is free software: you can redistribute it and/or modify it under  *)
8
(*  the terms of the GNU Affero General Public License as published by the Free   *)
9
(*  Software Foundation, either version 3 of the License, or any later version.   *)
10
(*                                                                                *)
11
(*  Fingerboard is distributed in the hope that it will be useful, but WITHOUT    *)
12
(*  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or         *)
13
(*  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License   *)
14
(*  for more details.                                                             *)
15
(*                                                                                *)
16
(*  You should have received a copy of the GNU Affero General Public License      *)
17
(*  along with Fingerboard. If not, see <https://www.gnu.org/licenses/>.          *)
18
(**********************************************************************************)
19

20
include struct
21
  [@@@coverage off]
22

23
  type t = float [@@deriving compare, equal, hash, sexp_of]
24
end
25

26
let check_exn f =
NEW
27
  if Float.compare f 0. < 0 then raise_s [%sexp "Out of bounds", [%here], (f : float)]
×
28
;;
29

30
let of_float_exn f =
31
  check_exn f;
433✔
32
  f
433✔
33
;;
34

35
let to_float f = f
487✔
36
let a4_440 = 440.
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc