Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Fix up the testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Clasen committed Aug 8, 2005
1 parent eb37812 commit 81b6a73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/convert-test.c
Expand Up @@ -99,16 +99,16 @@ 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;
gsize bytes_written = 0;
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);
Expand All @@ -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);
Expand Down

0 comments on commit 81b6a73

Please sign in to comment.