[discident-glib] tests: Add more debug for EAN lookups



commit d63f361110169801cafaf7092591a645667884e6
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Oct 8 20:44:15 2012 +0200

    tests: Add more debug for EAN lookups

 discident-glib/test-diglib.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/discident-glib/test-diglib.c b/discident-glib/test-diglib.c
index 65296dc..e1a9983 100644
--- a/discident-glib/test-diglib.c
+++ b/discident-glib/test-diglib.c
@@ -84,11 +84,19 @@ test_ean (void)
 {
 	DiscidentEan *ean;
 	char *title, *img_url;
+	GError *error = NULL;
+	gboolean ret;
 
 	ean = discident_ean_new ();
 	g_assert (discident_ean_login (ean, NULL) != FALSE);
 
 	/* The Little Book of Stress: Calm is for Wimps, Get Real, Get Stressed */
+	ret = discident_ean_lookup (ean, "9780091865856", &title, &img_url, &error);
+	if (ret == FALSE) {
+		g_test_message ("discident_ean_lookup() failed with: %s", error->message);
+		g_error_free (error);
+		g_assert_not_reached ();
+	}
 	g_assert (discident_ean_lookup (ean, "9780091865856", &title, &img_url, NULL) != FALSE);
 	g_assert_cmpstr ("The Little Book of Stress: Calm Is for Wimps. Get Real. Get Stressed", ==, title);
 	g_assert (img_url != NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]