diff options
author | David Robillard <d@drobilla.net> | 2021-07-10 22:01:30 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-14 19:37:51 -0500 |
commit | 07b716c38625dd954be279e3476164b5bb1d6293 (patch) | |
tree | 3b2d75ab74dad40c7d54d2dbee2fcad3d54f6935 /test | |
parent | 94eeeadeb5be3d9c9266bed5d3c32c6ff29695b4 (diff) | |
download | serd-07b716c38625dd954be279e3476164b5bb1d6293.tar.gz serd-07b716c38625dd954be279e3476164b5bb1d6293.tar.bz2 serd-07b716c38625dd954be279e3476164b5bb1d6293.zip |
Add serd_statement_matches()
Diffstat (limited to 'test')
-rw-r--r-- | test/test_statement.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_statement.c b/test/test_statement.c index 6f92513f..45605dd1 100644 --- a/test/test_statement.c +++ b/test/test_statement.c @@ -84,6 +84,15 @@ test_fields(void) assert(serd_statement_graph(statement) == g); assert(serd_statement_caret(statement) != caret); assert(serd_caret_equals(serd_statement_caret(statement), caret)); + assert(serd_statement_matches(statement, s, p, o, g)); + assert(serd_statement_matches(statement, NULL, p, o, g)); + assert(serd_statement_matches(statement, s, NULL, o, g)); + assert(serd_statement_matches(statement, s, p, NULL, g)); + assert(serd_statement_matches(statement, s, p, o, NULL)); + assert(!serd_statement_matches(statement, o, NULL, NULL, NULL)); + assert(!serd_statement_matches(statement, NULL, o, NULL, NULL)); + assert(!serd_statement_matches(statement, NULL, NULL, s, NULL)); + assert(!serd_statement_matches(statement, NULL, NULL, NULL, s)); SerdStatement* const diff_s = serd_statement_new(o, p, o, g, caret); assert(!serd_statement_equals(statement, diff_s)); |