author | Sebastian Harl <sh@tokkee.org> | |
Mon, 23 Jun 2014 18:34:43 +0000 (20:34 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 23 Jun 2014 18:34:43 +0000 (20:34 +0200) |
t/unit/core/store_lookup_test.c | patch | blob | history |
index b5cb0d2000df93f75249ccb9fb31064cd542123c..4a935429923bb4dd1118c092756387cf1393fc0e 100644 (file)
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_<cond>_matcher() = NULL; expected: <matcher>");
+
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