summaryrefslogtreecommitdiff
path: root/Examples/test-suite/ocaml/li_std_string_runme.ml
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-05-12 16:04:23 +1200
committerOlly Betts <olly@survex.com>2023-05-12 16:05:48 +1200
commita44a7de3481e5f59c08dd71ec89b30b7578a52b9 (patch)
treeac737b23240668d04e529d819a3c963ff0a10d63 /Examples/test-suite/ocaml/li_std_string_runme.ml
parent1a31e9dc0cbcc458b241293a479123954f55f28c (diff)
downloadswig-a44a7de3481e5f59c08dd71ec89b30b7578a52b9.tar.gz
Expand li_std_string_runme.*
Add testing of the empty and null cases for all languages which already have a runme.
Diffstat (limited to 'Examples/test-suite/ocaml/li_std_string_runme.ml')
-rw-r--r--Examples/test-suite/ocaml/li_std_string_runme.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/Examples/test-suite/ocaml/li_std_string_runme.ml b/Examples/test-suite/ocaml/li_std_string_runme.ml
index 5f8c98a6b..3e0ad2c3b 100644
--- a/Examples/test-suite/ocaml/li_std_string_runme.ml
+++ b/Examples/test-suite/ocaml/li_std_string_runme.ml
@@ -41,4 +41,13 @@ let _ =
ignore (_Structure_StaticMemberString2 '(s));
assert (_Structure_StaticMemberString2 '() = s);
assert (_Structure_ConstStaticMemberString '() as string = "const static member string")
+
+ assert (_stdstring_empty '() as string = "")
+ assert (_c_empty '() as string = "")
+ (* FIXME: Can't work out what C++ NULL maps to here...
+ assert (_c_null '() = None)
+ assert (_get_null (_c_null '()) = None)
+ *)
+ assert (_get_null (_c_empty '()) as string = "non-null")
+ assert (_get_null (_stdstring_empty '()) as string = "non-null")
;;