[libgdata] contacts: Slightly relax a test condition
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] contacts: Slightly relax a test condition
- Date: Thu, 27 Oct 2011 07:56:02 +0000 (UTC)
commit 43934b019874eb6490f1df72d3d6dbb5fd034234
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Oct 27 08:52:36 2011 +0100
contacts: Slightly relax a test condition
Instead of requiring that a contact's creation date be at or after its last
edit date, require that the last edit date be within 5 seconds after the
contact's creation date.
gdata/tests/contacts.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdata/tests/contacts.c b/gdata/tests/contacts.c
index d693f97..8a8acdf 100644
--- a/gdata/tests/contacts.c
+++ b/gdata/tests/contacts.c
@@ -414,7 +414,8 @@ test_contact_insert (InsertData *data, gconstpointer service)
/* Check its edited date */
edited = gdata_contacts_contact_get_edited (contact);
creation_time = gdata_contacts_contact_get_edited (new_contact);
- g_assert_cmpint (creation_time, >=, edited);
+ g_assert_cmpint (creation_time + 5, >=, edited);
+ g_assert_cmpint (creation_time, <=, edited);
/* Various properties */
g_assert_cmpstr (gdata_contacts_contact_get_nickname (new_contact), ==, "Big J");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]