Merge branch 'local-ocamlbuild' into local-trunk
[SXSI/xpathcomp.git] / unit_test.ml
diff --git a/unit_test.ml b/unit_test.ml
deleted file mode 100644 (file)
index 1f7e732..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-(******************************************************************************)
-(*  SXSI : XPath evaluator                                                    *)
-(*  Kim Nguyen (Kim.Nguyen@nicta.com.au)                                      *)
-(*  Copyright NICTA 2008                                                      *)
-(*  Distributed under the terms of the LGPL (see LICENCE)                     *)
-(******************************************************************************)
-
-
-
-if Array.length (Sys.argv) <> 2
-then
-  begin
-    Printf.printf "usage: %s file.xml\n" (Sys.argv.(0));
-    exit 1
-  end
-
-    
-let doc = 
-       try 
-         Tree.load Sys.argv.(1) 
-       with
-         | _ -> 
-             (     try
-                     Tree.parse_xml_uri Sys.argv.(1) 
-                   with
-                     | _ ->(
-                         
-                         Printf.printf "Error parsing document\n";
-                         exit 2))
-;;
-
-
-let full_traversal tree = 
-  let rec loop t = 
-    if Tree.is_node t 
-    then
-      begin
-       (*ignore (Tree.tag t); *)
-      loop (Tree.node_child t);
-      loop (Tree.node_sibling t); 
-    end
-  in loop tree
-;;
-       
-
-let _ = Tag.init (Tree.tag_pool doc)
-
-let time f x =
-  let t1 = Unix.gettimeofday () in
-  let r = f x in
-  let t2 = Unix.gettimeofday () in 
-  let t = (1000. *.(t2 -. t1)) in
-    Printf.eprintf "  %fms\n%!" t ;
-    r
-;;
-let _ = Printf.eprintf "Timing traversal ... ";;
-let _ = time (full_traversal) doc
-;;