From: Søren Sandmann Pedersen <s...@redhat.com>

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.
---
 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;
 }
-- 
1.7.4

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to