summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-12-17 20:25:07 +0100
committerSébastien Helleu <flashcode@flashtux.org>2022-12-18 14:13:14 +0100
commiteb6cc0bc2afa96824667521d3405bd1c077a4690 (patch)
treea59c1e7205b18fb4bc16dba3915d0da4770e55e1 /tests
parent6aedddd351d8103c6e46283ca3aca7aa4a04f149 (diff)
downloadweechat-eb6cc0bc2afa96824667521d3405bd1c077a4690.zip
core: return number of bytes for UTF-8 char in function utf8_int_string
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test-core-utf8.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/core/test-core-utf8.cpp b/tests/unit/core/test-core-utf8.cpp
index 26f42bde2..7051e1478 100644
--- a/tests/unit/core/test-core-utf8.cpp
+++ b/tests/unit/core/test-core-utf8.cpp
@@ -458,16 +458,16 @@ TEST(CoreUtf8, Convert)
LONGS_EQUAL(0x92d, utf8_char_int (utf8_4bytes_truncated_3));
/* convert unicode char to a string */
- utf8_int_string (0, NULL);
- utf8_int_string (0, result);
+ LONGS_EQUAL(0, utf8_int_string (0, NULL));
+ LONGS_EQUAL(0, utf8_int_string (0, result));
STRCMP_EQUAL("", result);
- utf8_int_string (235, result);
+ LONGS_EQUAL(2, utf8_int_string (L'ë', result));
STRCMP_EQUAL("ë", result);
- utf8_int_string (0x20ac, result);
+ LONGS_EQUAL(3, utf8_int_string (L'€', result));
STRCMP_EQUAL("€", result);
- utf8_int_string (0x2ee9, result);
+ LONGS_EQUAL(3, utf8_int_string (0x2ee9, result));
STRCMP_EQUAL(UNICODE_CJK_YELLOW, result);
- utf8_int_string (0x24b62, result);
+ LONGS_EQUAL(4, utf8_int_string (0x24b62, result));
STRCMP_EQUAL(UNICODE_HAN_CHAR, result);
/* get wide char */