summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd3e376)
raw | patch | inline | side by side (parent: fd3e376)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 23 Jun 2014 05:15:45 +0000 (07:15 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 23 Jun 2014 05:15:45 +0000 (07:15 +0200) |
Thanks to Travis-CI for identifying this! I wonder why my local tests did not
catch this :-(
catch this :-(
t/unit/core/store_lookup_test.c | patch | blob | history |
index c125a5913a407c1e177998864d740d1427933d1d..e90dd06c1acee054d6388dcbd0ef7e5b99c4e4d0 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