From 60cc099df46e1cbcb7b37be3fe455978f800887f Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 23 Oct 2024 18:50:46 -0500 Subject: 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. --- test/vytree_test.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/vytree_test.ml') 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"] -- cgit v1.2.3