Added test programs.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 15 Nov 2008 21:21:00 +0000 (21:21 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 15 Nov 2008 21:21:00 +0000 (21:21 +0000)
.hgignore
ocaml-extlib/Makefile [new file with mode: 0644]
ocaml-extlib/test1.ml [new file with mode: 0644]

index 4f9dd21..f1cee45 100644 (file)
--- 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 (file)
index 0000000..7b2b399
--- /dev/null
@@ -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 (file)
index 0000000..ae5668d
--- /dev/null
@@ -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)
+