tests/test_json.c

changeset 1177
04ede4de9cec
parent 1157
3565ae61a5a2
child 1179
ca4c6f590a08
--- a/tests/test_json.c	Mon Feb 10 18:25:16 2025 +0100
+++ b/tests/test_json.c	Mon Feb 10 19:20:43 2025 +0100
@@ -197,7 +197,7 @@
         CX_TEST_ASSERT(cxJsonIsString(wide));
         CX_TEST_ASSERT(0 == cx_strcmp(
             cxJsonAsCxString(wide),
-            CX_STR("\u03a3\u29b0"))
+            CX_STR(u8"\u03a3\u29b0"))
         );
         
         CxJsonValue *surrogatepair1 = cxJsonObjGet(obj, "surrogatepair1");
@@ -215,10 +215,12 @@
         );
         
         CxJsonValue *mixed2 = cxJsonObjGet(obj, "mixed2");
-        CX_TEST_ASSERT(cxJsonIsString(mixed2));
+        char test[16];
+        strncpy(test, mixed2->value.string.ptr, 15);
+       CX_TEST_ASSERT(cxJsonIsString(mixed2));
         CX_TEST_ASSERT(0 == cx_strcmp(
             cxJsonAsCxString(mixed2),
-            CX_STR("123\u03a3\xf0\x9f\xaf\x85ß"))
+            CX_STR("123\xce\xa3\xf0\x9f\xaf\x85ß"))
         );
         
         cxJsonValueFree(obj);

mercurial