filter = event_filter_create();
/* should match empty list */
- event_filter_parse("abc=\"\"", filter, NULL);
+ test_assert(event_filter_parse("abc=\"\"", filter, NULL) == 0);
test_assert(event_filter_match(filter, e, &failure_ctx));
/* should still be empty */
event_strlist_append(e, "abc", NULL);
/* should match non-empty list that has value 'one' */
filter = event_filter_create();
event_strlist_append(e, "abc", "two");
- event_filter_parse("abc=one", filter, NULL);
+ test_assert(event_filter_parse("abc=one", filter, NULL) == 0);
test_assert(event_filter_match(filter, e, &failure_ctx));
event_filter_unref(&filter);
/* should match non-empty list that has no value 'three' */
filter = event_filter_create();
- event_filter_parse("abc=one AND NOT abc=three", filter, NULL);
+ test_assert(event_filter_parse("abc=one AND NOT abc=three", filter, NULL) == 0);
test_assert(event_filter_match(filter, e, &failure_ctx));
event_filter_unref(&filter);
filter = event_filter_create();
- event_filter_parse("abc>one", filter, NULL);
+ test_assert(event_filter_parse("abc>one", filter, NULL) == 0);
test_expect_error_string("Event filter for string list field 'abc' only "
"supports equality operation '=' not '>'.");
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* empty filter: parent is non-empty */
filter = event_filter_create();
- event_filter_parse("list1=\"\"", filter, NULL);
+ test_assert(event_filter_parse("list1=\"\"", filter, NULL) == 0);
test_assert(event_filter_match(filter, e, &failure_ctx));
event_strlist_append(parent, "list1", "foo");
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* matching filter: matches parent */
filter = event_filter_create();
- event_filter_parse("list2=parent", filter, NULL);
+ test_assert(event_filter_parse("list2=parent", filter, NULL) == 0);
/* empty: */
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* set parent but no child: */
/* matching filter: matches child */
filter = event_filter_create();
- event_filter_parse("list3=child", filter, NULL);
+ test_assert(event_filter_parse("list3=child", filter, NULL) == 0);
/* empty: */
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* set child but no parent: */
/* empty filter: global is non-empty */
filter = event_filter_create();
- event_filter_parse("list1=\"\"", filter, NULL);
+ test_assert(event_filter_parse("list1=\"\"", filter, NULL) == 0);
test_assert(event_filter_match(filter, e, &failure_ctx));
event_strlist_append(global, "list1", "foo");
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* matching filter: matches global */
filter = event_filter_create();
- event_filter_parse("list2=global", filter, NULL);
+ test_assert(event_filter_parse("list2=global", filter, NULL) == 0);
/* empty: */
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* set global but no local: */
/* matching filter: matches local */
filter = event_filter_create();
- event_filter_parse("list3=local", filter, NULL);
+ test_assert(event_filter_parse("list3=local", filter, NULL) == 0);
/* empty: */
test_assert(!event_filter_match(filter, e, &failure_ctx));
/* set local but no global: */