Sat, 15 Mar 2025 22:58:51 +0100
fix warning in test case due to C23 multibyte strings not being compatible with const char*
tests/test_json.c | file | annotate | diff | comparison | revisions |
--- a/tests/test_json.c Thu Mar 13 11:07:00 2025 +0100 +++ b/tests/test_json.c Sat Mar 15 22:58:51 2025 +0100 @@ -195,10 +195,7 @@ CxJsonValue *wide = cxJsonObjGet(obj, "wide"); CX_TEST_ASSERT(cxJsonIsString(wide)); - // suncc compiler bug: - // u8 string literals don't work inside CX_TEST_ASSERT and CX_STR - cxstring wide_str = cx_str(u8"\u03a3\u29b0"); - CX_TEST_ASSERT(0 == cx_strcmp(cxJsonAsCxString(wide), wide_str)); + CX_TEST_ASSERT(0 == cx_strcmp(cxJsonAsCxString(wide), CX_STR("Σ⦰"))); CxJsonValue *surrogatepair1 = cxJsonObjGet(obj, "surrogatepair1"); CX_TEST_ASSERT(cxJsonIsString(surrogatepair1));