[gom] tests: Fix stress test when upping NUM_RECORDS



commit bd8089928f09690e60ac5ff55235f502f819486c
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Sep 21 19:01:43 2014 +0200

    tests: Fix stress test when upping NUM_RECORDS

 tests/test-gom-stress.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/tests/test-gom-stress.c b/tests/test-gom-stress.c
index 606f304..1c996ea 100644
--- a/tests/test-gom-stress.c
+++ b/tests/test-gom-stress.c
@@ -158,7 +158,7 @@ stress (void)
    GValue value = { 0, };
    GomFilter *filter;
    guint i;
-   char *s1, *s2;
+   char *s1, *s2, *name, *surname;
    ItemResource *it;
 
    adapter = gom_adapter_new();
@@ -209,8 +209,13 @@ stress (void)
                 NULL);
    g_object_unref(it);
 
-   g_assert_cmpstr(s1, ==, "First name #500");
-   g_assert_cmpstr(s2, ==, "Surname #500");
+   name = g_strdup_printf ("First name #%d", ITEM_TO_GET);
+   surname = g_strdup_printf ("Surname #%d", ITEM_TO_GET);
+
+   g_assert_cmpstr(s1, ==, name);
+   g_free(name);
+   g_assert_cmpstr(s2, ==, surname);
+   g_free(surname);
    g_free(s1);
    g_free(s2);
 


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