Update format of serialisation for B+TREE:
as the tree is ordered, a '[]' has to be used.
This commit is contained in:
1 parent
dc1445e0d6
commit
0557527bfe
2 files changed
+18
-18
No files matched your search
@@ -312,7 +312,7 @@ static void test_io(void)
|
||||
M_LET(str, STRING_OPLIST)
|
||||
M_LET(tree1, tree2, BPTREE_OPLIST2(btree_my, TESTOBJ_CMP_OPLIST, TESTOBJ_CMP_OPLIST)) {
|
||||
btree_my_get_str(str, tree1, false);
|
||||
assert(string_equal_str_p(str, "{}"));
|
||||
assert(string_equal_str_p(str, "[]"));
|
||||
const char *endp;
|
||||
bool b = btree_my_parse_str(tree2, string_get_cstr(str), &endp);
|
||||
assert(b);
|
||||
@@ -339,7 +339,7 @@ static void test_io(void)
|
||||
btree_my_set_at(tree1, mpz1, mpz2);
|
||||
|
||||
btree_my_get_str(str, tree1, false);
|
||||
assert(string_equal_str_p(str, "{17:170,67:670}"));
|
||||
assert(string_equal_str_p(str, "[17:170,67:670]"));
|
||||
b = btree_my_parse_str(tree2, string_get_cstr(str), &endp);
|
||||
assert(b);
|
||||
assert(*endp == 0);
|
||||
|
||||
Reference in new issue
Block a user