diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-07-15 17:34:26 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2020-07-20 14:37:01 +0300 |
commit | dd641fae997d71c8396b77def2fa25ad96fdf47f (patch) | |
tree | d0130be49a573e7816aee25684cbaa91d4bf8b46 /test | |
parent | 39ddab7183928f786bf329145767debe743f4c0c (diff) |
Remove custome string functions
Diffstat (limited to 'test')
-rw-r--r-- | test/csync/encoding_tests/check_encoding.cpp | 86 | ||||
-rw-r--r-- | test/csync/vio_tests/check_vio_ext.cpp | 1 |
2 files changed, 0 insertions, 87 deletions
diff --git a/test/csync/encoding_tests/check_encoding.cpp b/test/csync/encoding_tests/check_encoding.cpp index 372005e93..fcefa7ef3 100644 --- a/test/csync/encoding_tests/check_encoding.cpp +++ b/test/csync/encoding_tests/check_encoding.cpp @@ -19,7 +19,6 @@ */ #include <stdio.h> #include "c_string.h" -#include "c_utf8.h" #include "common/filesystembase.h" #include "torture.h" @@ -29,87 +28,6 @@ #include "torture.h" -static void check_iconv_to_native_normalization(void **state) -{ - mbchar_t *out = NULL; - const char *in= "\x48\xc3\xa4"; // UTF8 -#ifdef __APPLE__ - const char *exp_out = "\x48\x61\xcc\x88"; // UTF-8-MAC -#else - const char *exp_out = "\x48\xc3\xa4"; // UTF8 -#endif - - out = c_utf8_path_to_locale(in); - assert_string_equal(out, exp_out); - - c_free_locale_string(out); - assert_null(out); - - (void) state; /* unused */ -} - -static void check_iconv_from_native_normalization(void **state) -{ -#ifdef _WIN32 - const mbchar_t *in = L"\x48\xc3\xa4"; // UTF-8 -#else -#ifdef __APPLE__ - const mbchar_t *in = "\x48\x61\xcc\x88"; // UTF-8-MAC -#else - const mbchar_t *in = "\x48\xc3\xa4"; // UTF-8 -#endif -#endif - const char *exp_out = "\x48\xc3\xa4"; // UTF-8 - - QByteArray out = c_utf8_from_locale(in); - assert_string_equal(out, exp_out); - - (void) state; /* unused */ -} - -static void check_iconv_ascii(void **state) -{ -#ifdef _WIN32 - const mbchar_t *in = L"abc/ABC\\123"; // UTF-8 -#else -#ifdef __APPLE__ - const mbchar_t *in = "abc/ABC\\123"; // UTF-8-MAC -#else - const mbchar_t *in = "abc/ABC\\123"; // UTF-8 -#endif -#endif - const char *exp_out = "abc/ABC\\123"; - - QByteArray out = c_utf8_from_locale(in); - assert_string_equal(out, exp_out); - - (void) state; /* unused */ -} - -#define TESTSTRING "#cA\\#fߧ4" -#define LTESTSTRING L"#cA\\#fߧ4" - -static void check_to_multibyte(void **state) -{ - int rc = -1; - - mbchar_t *mb_string = c_utf8_path_to_locale( TESTSTRING ); - mbchar_t *mb_null = c_utf8_path_to_locale( NULL ); - - (void) state; - -#ifdef _WIN32 - assert_int_equal( wcscmp( LTESTSTRING, mb_string), 0 ); -#else - assert_string_equal(mb_string, TESTSTRING); -#endif - assert_true( mb_null == NULL ); - assert_int_equal(rc, -1); - - c_free_locale_string(mb_string); - c_free_locale_string(mb_null); -} - static void check_long_win_path(void **state) { (void) state; /* unused */ @@ -171,10 +89,6 @@ int torture_run_tests(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(check_long_win_path), - cmocka_unit_test(check_to_multibyte), - cmocka_unit_test(check_iconv_ascii), - cmocka_unit_test(check_iconv_to_native_normalization), - cmocka_unit_test(check_iconv_from_native_normalization), }; diff --git a/test/csync/vio_tests/check_vio_ext.cpp b/test/csync/vio_tests/check_vio_ext.cpp index fbe21ef78..1fdf253bd 100644 --- a/test/csync/vio_tests/check_vio_ext.cpp +++ b/test/csync/vio_tests/check_vio_ext.cpp @@ -25,7 +25,6 @@ #include <stdio.h> #include "csync.h" -#include "std/c_utf8.h" #include "std/c_alloc.h" #include "std/c_string.h" #include "vio/csync_vio_local.h" |