[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:
Zackery Spytz 2019-01-03 07:34:25 -07:00
commit 1be9f5fec3
5 changed files with 12 additions and 14 deletions

View file

@ -1,4 +1,5 @@
open Swig
open Example
let _ = _f (match Sys.argv.(1) with "Tag1" -> ``Tag1 | _ -> ``Tag2)
let arg = if Array.length Sys.argv > 1 then Sys.argv.(1) else "Tag1"
let _ = _f (match arg with "Tag1" -> ``Tag1 | _ -> ``Tag2)