Skip to content

Commit

Permalink
Update the tests to use MATCHES
Browse files Browse the repository at this point in the history
  • Loading branch information
hirrolot committed Aug 12, 2021
1 parent ad502ef commit 0b761ee
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ int main(void) {
(void)d_2;
(void)d_3;

assert(matches(a, A));
assert(matches(b, B));
assert(matches(c, C));
assert(matches(d, D));
assert(MATCHES(a, A));
assert(MATCHES(b, B));
assert(MATCHES(c, C));
assert(MATCHES(d, D));

assert(!matches(a, C));
assert(!matches(b, D));
assert(!matches(c, B));
assert(!matches(d, A));
assert(!MATCHES(a, C));
assert(!MATCHES(b, D));
assert(!MATCHES(c, B));
assert(!MATCHES(d, A));

// Pass an lvalue to `matches`.
assert(matches(A(), A));
assert(MATCHES(A(), A));

assert(a.tag == ATag);
assert(b.tag == BTag);
Expand Down

0 comments on commit 0b761ee

Please sign in to comment.