diff options
author | John Estabrook <jestabro@vyos.io> | 2024-10-23 18:50:46 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-10-27 21:17:27 -0500 |
commit | 60cc099df46e1cbcb7b37be3fe455978f800887f (patch) | |
tree | 23c9ee764213794de3945799253a61928fe36d69 /test/vytree_test.ml | |
parent | 92b9c5e1a47be12b1e5dd7c6f069e69d28465eac (diff) | |
download | vyconf-60cc099df46e1cbcb7b37be3fe455978f800887f.tar.gz vyconf-60cc099df46e1cbcb7b37be3fe455978f800887f.zip |
T6718: update tests
Update tests, as appropriate: for example, the Vyconf config file
grammar is distinct from the one currently used in vyos1x-config,
consequently the curly_parser_test is not included.
Diffstat (limited to 'test/vytree_test.ml')
-rw-r--r-- | test/vytree_test.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/vytree_test.ml b/test/vytree_test.ml index 6133fb3..ecd75eb 100644 --- a/test/vytree_test.ml +++ b/test/vytree_test.ml @@ -1,5 +1,7 @@ +[@@@ocaml.warning "-27"] + open OUnit2 -open Vytree +open Vyos1x.Vytree (* Destructuting a freshly made node gives us what we made it from *) @@ -148,7 +150,7 @@ let test_merge_children_no_duplicates test_ctxt = [make_full () "foo" [make () "bar"]; make () "bar"; make_full () "baz" [make () "quuz"]] in - let node' = merge_children (fun x y -> x) node in + let node' = merge_children (fun x y -> x) (fun x y -> compare x y) node in assert_equal (list_children node') ["foo"; "bar"; "baz"] @@ -160,7 +162,7 @@ let test_merge_children_has_duplicates test_ctxt = [make_full () "foo" [make () "bar"]; make () "quux"; make_full () "foo" [make () "baz"]] in - let node' = merge_children (fun x y -> x) node in + let node' = merge_children (fun x y -> x) (fun x y -> compare x y) node in assert_equal (list_children node') ["foo"; "quux"]; assert_equal (get node' ["foo"] |> list_children) ["bar"; "baz"] |