[OCaml] Fix some of the OCaml examples
Update some of the OCaml examples so that they run successfully with `make check-ocaml-examples` (important for the CI). Some of the examples were written to depend on passed arguments. Temporarily disable the broken std_string example.
This commit is contained in:
parent
539d145b96
commit
1be9f5fec3
5 changed files with 12 additions and 14 deletions
|
|
@ -4,4 +4,9 @@ open Example
|
|||
let _ = print_endline "This won't throw."
|
||||
let _ = Printf.printf "Cos 1.0 is %f\n" (_cos '(1.0) as float)
|
||||
let _ = print_endline "This will throw."
|
||||
let _ = Printf.printf "Cos 5.0 is %f\n" (_cos '(5.0) as float)
|
||||
let _ =
|
||||
try
|
||||
Printf.printf "Cos 5.0 is %f\n" (_cos '(5.0) as float)
|
||||
with Failure s ->
|
||||
print_endline s ;
|
||||
print_endline "Exception thrown."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue