diff options
author | Hugo Beauzée-Luyssen <hugo@beauzee.fr> | 2019-02-18 17:12:54 +0100 |
---|---|---|
committer | Hugo Beauzée-Luyssen <hugo@beauzee.fr> | 2019-02-21 15:24:56 +0100 |
commit | 17e399701b9e03f0304c70b08b7aa9f2333dac6f (patch) | |
tree | 92a4eb3e63e480b380b4a472ff5a695bc3a605fb /tests/conv-utf8.c | |
parent | 15912b1f0f9a485948b7f34304a1b20d2182e26f (diff) | |
download | gnutls-17e399701b9e03f0304c70b08b7aa9f2333dac6f.tar.gz |
iconv: Allow _gnutls_utf8_to_ucs2 to output little endian
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Diffstat (limited to 'tests/conv-utf8.c')
-rw-r--r-- | tests/conv-utf8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/conv-utf8.c b/tests/conv-utf8.c index 73f4ff3abd..9d630e73d0 100644 --- a/tests/conv-utf8.c +++ b/tests/conv-utf8.c @@ -35,7 +35,7 @@ #include <cmocka.h> int _gnutls_utf8_to_ucs2(const void *data, size_t size, - gnutls_datum_t * output); + gnutls_datum_t * output, unsigned be); int _gnutls_ucs2_to_utf8(const void *data, size_t size, gnutls_datum_t * output, unsigned be); @@ -60,7 +60,7 @@ static void PRINT(const char *str, unsigned char *val, unsigned int size) static void fname(void **glob_state) \ { \ gnutls_datum_t out; \ - int ret = _gnutls_utf8_to_ucs2(utf8, strlen(utf8), &out); \ + int ret = _gnutls_utf8_to_ucs2(utf8, strlen(utf8), &out, 1); \ assert_int_equal(ret, 0); \ if (out.size != sizeof(utf16)-1 || memcmp(utf16, out.data, out.size) != 0) { PRINT("got: ", out.data, out.size); \ PRINT("expected: ", (unsigned char*)utf16, sizeof(utf16)-1); } \ @@ -86,7 +86,7 @@ static void fname(void **glob_state) \ static void fname(void **glob_state) \ { \ gnutls_datum_t out; \ - int ret = _gnutls_utf8_to_ucs2(utf8, utf8_size, &out); \ + int ret = _gnutls_utf8_to_ucs2(utf8, utf8_size, &out, 1); \ assert_int_not_equal(ret, 0); \ } |