/* check that len == -1 yields identical results */
error2 = NULL;
result2 = g_utf8_to_ucs4 (utf8, -1, &items_read2, &items_written2, &error2);
- g_assert (items_read2 == items_read);
- g_assert (items_written2 == items_written2);
+ g_assert (error || items_read2 == items_read);
+ g_assert (error || items_written2 == items_written2);
g_assert (!!result == !!result2);
g_assert (!!error == !!error2);
if (result)
error2 = NULL;
result2 = g_ucs4_to_utf8 (ucs4, -1, &items_read2, &items_written2, &error2);
- g_assert (items_read2 == items_read);
- g_assert (items_written2 == items_written);
+ g_assert (error || items_read2 == items_read);
+ g_assert (error || items_written2 == items_written);
g_assert (!!result == !!result2);
g_assert (!!error == !!error2);
if (result)
/* check that len == -1 yields identical results */
error2 = NULL;
result2 = g_utf8_to_utf16 (utf8, -1, &items_read2, &items_written2, &error2);
- g_assert (items_read2 == items_read);
- g_assert (items_written2 == items_written2);
+ g_assert (error || items_read2 == items_read);
+ g_assert (error || items_written2 == items_written2);
g_assert (!!result == !!result2);
g_assert (!!error == !!error2);
if (result)
error2 = NULL;
result2 = g_utf16_to_utf8 (utf16, -1, &items_read2, &items_written2, &error2);
- g_assert (items_read2 == items_read);
- g_assert (items_written2 == items_written);
+ g_assert (error || items_read2 == items_read);
+ g_assert (error || items_written2 == items_written);
g_assert (!!result == !!result2);
g_assert (!!error == !!error2);
if (result)
error2 = NULL;
result2 = g_ucs4_to_utf16 (ucs4, -1, &items_read2, &items_written2, &error2);
- g_assert (items_read2 == items_read);
- g_assert (items_written2 == items_written);
+ g_assert (error || items_read2 == items_read);
+ g_assert (error || items_written2 == items_written);
g_assert (!!result == !!result2);
g_assert (!!error == !!error2);
if (result)
/* check that len == -1 yields identical results */
error2 = NULL;
result2 = g_utf16_to_ucs4 (utf16, -1, &items_read2, &items_written2, &error2);
- g_assert (items_read2 == items_read);
- g_assert (items_written2 == items_written2);
+ g_assert (error || items_read2 == items_read);
+ g_assert (error || items_written2 == items_written2);
g_assert (!!result == !!result2);
g_assert (!!error == !!error2);
if (result)