X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Fcore%2Fstore_lookup_test.c;h=e90dd06c1acee054d6388dcbd0ef7e5b99c4e4d0;hp=c125a5913a407c1e177998864d740d1427933d1d;hb=383196c820697409670d67f59f180300b4d6bcfa;hpb=fd3e376f4c7dc24c40717c056548c4e26e4e8b97 diff --git a/t/unit/core/store_lookup_test.c b/t/unit/core/store_lookup_test.c index c125a59..e90dd06 100644 --- a/t/unit/core/store_lookup_test.c +++ b/t/unit/core/store_lookup_test.c @@ -302,16 +302,26 @@ START_TEST(test_store_cond) golden_data[i].attr, buf); for (j = 0; j < SDB_STATIC_ARRAY_LEN(tests); ++j) { - sdb_store_matcher_t *m = tests[j].matcher(c); + sdb_store_matcher_t *m; char m_str[1024]; - sdb_object_deref(SDB_OBJ(c)); + + m = tests[j].matcher(c); + fail_unless(m != NULL, + "sdb_store__matcher() = NULL; expected: "); + status = sdb_store_matcher_matches(m, obj); fail_unless(status == *tests[j].expected, "sdb_store_matcher_matches(%s) = %d; expected: %d", sdb_store_matcher_tostring(m, m_str, sizeof(m_str)), status, *tests[j].expected); + + sdb_object_deref(SDB_OBJ(m)); } + + sdb_object_deref(SDB_OBJ(c)); } + + sdb_object_deref(SDB_OBJ(obj)); } END_TEST