[libgnome-keyring] Bring tests in sync with the implementation.
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgnome-keyring] Bring tests in sync with the implementation.
- Date: Mon, 14 Dec 2009 15:13:12 +0000 (UTC)
commit ee4d2ba4f3ec6bccff68474fb7549bedb16ce35e
Author: Stef Walter <stef memberwebs com>
Date: Mon Dec 14 02:37:12 2009 +0000
Bring tests in sync with the implementation.
library/tests/test-keyrings.c | 7 ++++++-
library/tests/test-other.c | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/library/tests/test-keyrings.c b/library/tests/test-keyrings.c
index 0a17ed2..e4dc235 100644
--- a/library/tests/test-keyrings.c
+++ b/library/tests/test-keyrings.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <time.h>
#include "run-auto-test.h"
@@ -201,12 +202,16 @@ DEFINE_TEST(find_keyrings)
GnomeKeyringFound* f;
guint id, i;
GList *found;
+ guint num;
+
+ /* Unique for every run */
+ num = time (NULL);
attrs = gnome_keyring_attribute_list_new ();
gnome_keyring_attribute_list_append_string (attrs, "dog", "woof");
gnome_keyring_attribute_list_append_string (attrs, "bird", "cheep");
gnome_keyring_attribute_list_append_string (attrs, "iguana", "");
- gnome_keyring_attribute_list_append_uint32 (attrs, "num", 19);
+ gnome_keyring_attribute_list_append_uint32 (attrs, "num", num);
/* Create the item */
res = gnome_keyring_item_create_sync ("session", GNOME_KEYRING_ITEM_GENERIC_SECRET,
diff --git a/library/tests/test-other.c b/library/tests/test-other.c
index 3aa164c..0324af3 100644
--- a/library/tests/test-other.c
+++ b/library/tests/test-other.c
@@ -33,8 +33,9 @@ DEFINE_TEST(set_display)
{
GnomeKeyringResult res;
+ /* Deprecated method */
res = gnome_keyring_daemon_set_display_sync (":0.0");
- g_assert_cmpint (GNOME_KEYRING_RESULT_OK, ==, res);
+ g_assert_cmpint (GNOME_KEYRING_RESULT_DENIED, ==, res);
}
DEFINE_TEST(setup_environment)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]