File: test_enum.ml

package info (click to toggle)
ocurl 0.9.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 976 kB
  • sloc: ansic: 4,194; ml: 2,857; makefile: 198; sh: 169
file content (18 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open Printf

let printfn fmt = ksprintf print_endline fmt

external check_enums : unit -> (int * int * string) array = "caml_curl_check_enums"

let () =
  let ok = ref true in
  Array.iter begin fun (last_used,last,name) ->
    if last_used + 1 <> last then
    begin
      ok := false;
      printfn "%s : need update : used %d, last %d" name last_used last
    end
    else
      printfn "%s : ok" name
  end (check_enums ());
  exit (if !ok then 0 else 1)