diff -r aa55109f01d0 -r a1a728d7ebfd tests/test_json.c --- a/tests/test_json.c Sun Dec 14 14:15:26 2025 +0100 +++ b/tests/test_json.c Sun Dec 14 14:29:27 2025 +0100 @@ -1676,8 +1676,7 @@ } CX_TEST_DO { - // TODO: only the first test works yet, change i<1 to i<10 for all tests - for(int i=0;i<1;i++) { + for(unsigned i=0;itype == a[i]->type); CX_TEST_ASSERT(cxJsonCompare(a[i], b) == 0); - // TODO: cxJsonToString(b, NULL) segfaults - //cxmutstr a_str = cxJsonToString(a[i], NULL); - //cxmutstr b_str = cxJsonToString(b, NULL); - //CX_TEST_ASSERT(cx_strcmp(a_str, b_str) == 0); + cxmutstr a_str = cxJsonToString(a[i], NULL); + cxmutstr b_str = cxJsonToString(b, NULL); + CX_TEST_ASSERT(cx_strcmp(a_str, b_str) == 0); + cx_strfree(&a_str); + cx_strfree(&b_str); cxJsonValueFree(b); } @@ -1710,8 +1710,7 @@ cxJsonFromString(NULL, "[ { \"array\": [ 1,2,3 ]} ]", &a[5]); CX_TEST_DO { - // TODO: only the first 4 tests work. Change i<4 to i<6 - for(int i=0;i<4;i++) { + for(unsigned i=0;i