diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2005-08-08 17:02:33 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-08-08 17:02:33 +0000 |
commit | 81b6a73938f881fb15f995a7837f0654e08941b0 (patch) | |
tree | 9e0999b78dfe5b83c2f2619a72043a8f5001eee6 | |
parent | eb37812fbedeca48fea746cdfc2220d83d854ad4 (diff) |
Fix up the testcase
-rw-r--r-- | tests/convert-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/convert-test.c b/tests/convert-test.c index 3a762475d..2b7596fac 100644 --- a/tests/convert-test.c +++ b/tests/convert-test.c @@ -99,8 +99,8 @@ test_one_half (void) static void test_byte_order (void) { - gchar *in_be = "\xfe\xff\x03\x93"; /* capital gamma */ - gchar *in_le = "\xff\xfe\x93\x03"; + gchar in_be[4] = { 0xfe, 0xff, 0x03, 0x93}; /* capital gamma */ + gchar in_le[4] = { 0xff, 0xfe, 0x93, 0x03}; gchar *expected = "\xce\x93"; gchar *out; gsize bytes_read = 0; @@ -108,7 +108,7 @@ test_byte_order (void) GError *error = NULL; int i; - out = g_convert (in_le, -1, + out = g_convert (in_be, sizeof (in_be), "UTF-8", "UTF-16", &bytes_read, &bytes_written, &error); @@ -119,7 +119,7 @@ test_byte_order (void) g_assert (strcmp (out, expected) == 0); g_free (out); - out = g_convert (in_le, -1, + out = g_convert (in_le, sizeof (in_le), "UTF-8", "UTF-16", &bytes_read, &bytes_written, &error); |