summaryrefslogtreecommitdiff
path: root/test/util_test.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/util_test.ml')
-rw-r--r--test/util_test.ml12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/util_test.ml b/test/util_test.ml
index 2f5bf5d..5e348fc 100644
--- a/test/util_test.ml
+++ b/test/util_test.ml
@@ -1,22 +1,26 @@
+[@@@ocaml.warning "-27"]
+
open OUnit2
-open Util
+
+module RT = Vyos1x.Reference_tree
+module U = Vyos1x.Util
let test_find_xml_child_existent test_ctxt =
let elem = Xml.Element ("foo", [],
[Xml.Element ("bar", [], []);
Xml.PCData "baz"])
in
- match (find_xml_child "bar" elem) with
+ match (RT.find_xml_child "bar" elem) with
| None -> assert_failure "find_xml_child returned None"
| Some x -> assert_equal (Xml.tag x) "bar"
let test_find_xml_child_nonexistent test_ctxt =
let elem = Xml.Element ("foo", [], [Xml.Element ("quux", [], [])]) in
- assert_equal (find_xml_child "bar" elem) None
+ assert_equal (RT.find_xml_child "bar" elem) None
let test_string_of_list test_ctxt =
let path = ["foo"; "bar"; "baz"] in
- assert_equal (String.trim (string_of_list path)) "foo bar baz"
+ assert_equal (String.trim (U.string_of_list path)) "foo bar baz"
let suite =
"Util tests" >::: [