From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Sat, 15 Nov 2008 21:21:00 +0000 (+0000) Subject: Added test programs. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=6294bf2fe7e48748379a845d26fa86c6abb5bc1b;p=fedora-mingw.git Added test programs. --- diff --git a/.hgignore b/.hgignore index 4f9dd21..f1cee45 100644 --- a/.hgignore +++ b/.hgignore @@ -81,6 +81,12 @@ ocaml/*.cmi ocaml/*.cmx ocaml/*.o ocaml-extlib/extlib-1.5.1.tar.gz +ocaml-extlib/NUL +ocaml-extlib/test1 +ocaml-extlib/*.exe +ocaml-extlib/*.cmi +ocaml-extlib/*.cmx +ocaml-extlib/*.o openssl/openssl-0.9.8g-usa.tar.bz2 pango/pango-1.21.6.tar.bz2 pango/pango-1.22.1.tar.bz2 diff --git a/ocaml-extlib/Makefile b/ocaml-extlib/Makefile new file mode 100644 index 0000000..7b2b399 --- /dev/null +++ b/ocaml-extlib/Makefile @@ -0,0 +1,15 @@ +# -*- Makefile -*- +# Test programs for extlib + +OCAMLOPTFLAGS = -I +extlib extLib.cmxa + +all: test1 test1.exe + +test1: test1.ml + ocamlopt $(OCAMLOPTFLAGS) $< -o $@ + +test1.exe: test1.ml + i686-pc-mingw32-ocamlopt $(OCAMLOPTFLAGS) $< -o $@ + +clean: + rm -f test1 *.exe *.cmi *.cmx *.o diff --git a/ocaml-extlib/test1.ml b/ocaml-extlib/test1.ml new file mode 100644 index 0000000..ae5668d --- /dev/null +++ b/ocaml-extlib/test1.ml @@ -0,0 +1,10 @@ +module StringMap = Map.Make (String) + +let () = + let map = StringMap.empty in + let map = StringMap.add "foo" "bar" map in + let map = StringMap.add "bar" "baz" map in + let map = StringMap.add "baz" "bil" map in + let map = StringMap.add "bil" "biz" map in + print_endline (Std.dump map) +