Add test case

This commit is contained in:
Patrick Pelissier committed 2022-07-27 23:48:59 +02:00
1 parent ee1dc2a8e8
commit 082adca3e6
1 file changed
+4
+4
View File
@@ -280,6 +280,10 @@ static void test_basic(void)
tree_get_str(s, t, false);
assert(string_equal_str_p(s, "[{0,[{2,[{1,[{-1,[{3}]},{5}]}]}]}]"));
tree_graft_child(it0, root);
tree_get_str(s, t, false);
assert(string_equal_str_p(s, "[{0,[{-1,[{3}]},{2,[{1,[{5}]}]}]}]"));
size_t hash = tree_hash(t);
assert(hash != 0);