From c93ebd50afc76e051ad9f7a5eb5ed14557698eab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 11 Jan 2006 16:49:22 +0000 Subject: [PATCH] Don't test items_read and items_written in error cases where it is not 2006-01-11 Matthias Clasen * tests/convert-test.c: Don't test items_read and items_written in error cases where it is not set. --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ ChangeLog.pre-2-12 | 3 +++ tests/convert-test.c | 24 ++++++++++++------------ 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7db351a..bdca69c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-01-11 Matthias Clasen + * tests/convert-test.c: Don't test items_read and + items_written in error cases where it is not set. + * tests/asyncqueue-test.c: Set error to NULL. 2006-01-08 Matthias Clasen diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7db351a..bdca69c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2006-01-11 Matthias Clasen + * tests/convert-test.c: Don't test items_read and + items_written in error cases where it is not set. + * tests/asyncqueue-test.c: Set error to NULL. 2006-01-08 Matthias Clasen diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 7db351a..bdca69c 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,8 @@ 2006-01-11 Matthias Clasen + * tests/convert-test.c: Don't test items_read and + items_written in error cases where it is not set. + * tests/asyncqueue-test.c: Set error to NULL. 2006-01-08 Matthias Clasen diff --git a/tests/convert-test.c b/tests/convert-test.c index 54d621d..87d57b2 100644 --- a/tests/convert-test.c +++ b/tests/convert-test.c @@ -164,8 +164,8 @@ check_utf8_to_ucs4 (const char *utf8, /* 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) @@ -240,8 +240,8 @@ check_ucs4_to_utf8 (const gunichar *ucs4, 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) @@ -304,8 +304,8 @@ check_utf8_to_utf16 (const char *utf8, /* 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) @@ -379,8 +379,8 @@ check_utf16_to_utf8 (const gunichar2 *utf16, 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) @@ -453,8 +453,8 @@ check_ucs4_to_utf16 (const gunichar *ucs4, 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) @@ -519,8 +519,8 @@ check_utf16_to_ucs4 (const gunichar2 *utf16, /* 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) -- 2.7.4