Factorize the hash system.
Insert option to select the hash at dynamic time.
This commit is contained in:
1 parent
8d0d8cfc50
commit
a3811b52ee
3 files changed
+40
-6
No files matched your search
+2
-1
@@ -75,7 +75,8 @@ static void check_io(void)
|
||||
assert (string_cmp_str (str, "{\"LICENCE\":\"BSD3\"}") == 0);
|
||||
dict_str_set_at (dict, STRING_CTE("AUTHOR"), STRING_CTE("PP"));
|
||||
dict_str_get_str(str, dict, false);
|
||||
assert (string_cmp_str (str, "{\"AUTHOR\":\"PP\",\"LICENCE\":\"BSD3\"}") == 0);
|
||||
//NOTE: order is dependent on the hash system.
|
||||
assert (string_cmp_str (str, "{\"LICENCE\":\"BSD3\",\"AUTHOR\":\"PP\"}") == 0);
|
||||
FILE *f = fopen ("a.dat", "wt");
|
||||
if (!f) abort();
|
||||
dict_str_out_str(f, dict);
|
||||
|
||||
Reference in new issue
Block a user