diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-01-21 15:02:53 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-02-13 02:18:01 -0500 |
commit | 6781636740099633b9a8f7e0cc8e7828770f2fc3 (patch) | |
tree | e3f1abcd3a8c4aabfb8908e53770e0869ff4992c | |
parent | d1434d112ca5cd325e4fb85fc60afd1b9e902786 (diff) |
a1-trap-test: Add tests for operator_name and format_name()
The check-formats.c test depends on the exact format of the strings
returned from these functions, so add a test here.
a1-trap-test isn't the ideal place, but it seems like overkill to add
a new test just for these trivial checks.
-rw-r--r-- | test/a1-trap-test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/a1-trap-test.c b/test/a1-trap-test.c index 93c6caa..c2b4883 100644 --- a/test/a1-trap-test.c +++ b/test/a1-trap-test.c @@ -45,6 +45,14 @@ main (int argc, char **argv) assert (bits[1] == 0xffffffff); assert (bits[1 * WIDTH + 0] == 0xffffffff); assert (bits[1 * WIDTH + 1] == 0xffffffff); + + /* The check-formats test depends on operator_name() and format_name() returning + * these precise formats, so if those change, check-formats.c must be updated too. + */ + assert ( + strcmp (operator_name (PIXMAN_OP_DISJOINT_OVER), "PIXMAN_OP_DISJOINT_OVER") == 0); + assert ( + strcmp (format_name (PIXMAN_r5g6b5), "r5g6b5") == 0); return 0; } |