Add rotate-test.c test program
authorSøren Sandmann Pedersen <ssp@redhat.com>
Thu, 20 Sep 2012 22:41:33 +0000 (18:41 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 23 Sep 2012 03:41:19 +0000 (23:41 -0400)
commit550dfc5e7ecd5b099c1009d77c56cb91a62caeb1
tree054c708a2df461f01f2577acae8a45ffe0cf86b1
parent2ab77c97a5a3a816d6383bdc3b6c8bdceb0383b7
Add rotate-test.c test program

This program exercises a bug in pixman-image.c where "-1" and "1" were
used instead of the correct "- pixman_fixed_1" and "pixman_fixed_1".

With the fast implementation enabled:

     % ./rotate-test
     rotate test failed! (checksum=35A01AAB, expected 03A24D51)

Without it:

     % env PIXMAN_DISABLE=fast ./rotate-test
     pixman: Disabled fast implementation
     rotate test passed (checksum=03A24D51)

V2: The first version didn't have lcg_srand (testnum) in test_transform().
test/Makefile.sources
test/rotate-test.c [new file with mode: 0644]