test cases for ocaml problem