Add method for the operator OUT_STR for the default type.

This commit is contained in:
Patrick Pelissier committed 2018-08-21 19:26:18 +02:00
1 parent 7447492c76
commit dbb34b75fd
3 files changed
+14 -2

No files matched your search

+3
View File
@@ -596,6 +596,7 @@ LIST_DEF(list_int, int)
static void test_out_default_oplist(void)
{
M_LET(str, string_t)
M_LET(list, list_int_t) {
FILE *f = fopen ("a-mlist.dat", "wt");
if (!f) abort();
@@ -609,6 +610,8 @@ static void test_out_default_oplist(void)
assert (fgets(buffer, 1024, f) == buffer);
assert (strcmp(buffer, "[3,2]") == 0);
fclose(f);
list_int_get_str(str, list, false);
assert (string_equal_str_p(str, "[3,2]"));
}
}
#else