[glib] Improve GChecksum test coverage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Improve GChecksum test coverage
- Date: Mon, 6 Jun 2011 05:14:59 +0000 (UTC)
commit e02d8165d9e249e16328e1a9db9a8ad633a02d0f
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 6 01:13:26 2011 -0400
Improve GChecksum test coverage
glib/tests/checksum.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/checksum.c b/glib/tests/checksum.c
index 0e51736..a58d8a0 100644
--- a/glib/tests/checksum.c
+++ b/glib/tests/checksum.c
@@ -593,6 +593,7 @@ test_checksum (gconstpointer d)
{
const ChecksumTest *test = d;
GChecksum *checksum;
+ GChecksum *checksum2;
const char *p;
int chunk_length;
@@ -604,9 +605,12 @@ test_checksum (gconstpointer d)
g_checksum_update (checksum, (const guchar *)p,
MIN (chunk_length, test->length - (p - FIXED_STR)));
}
-
+ checksum2 = g_checksum_copy (checksum);
g_assert_cmpstr (g_checksum_get_string (checksum), ==, test->sum);
g_checksum_free (checksum);
+
+ g_assert_cmpstr (g_checksum_get_string (checksum2), ==, test->sum);
+ g_checksum_free (checksum2);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]