diff options
author | Eric Anholt <eric@anholt.net> | 2016-02-01 13:48:45 -0800 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-02-08 16:13:12 -0500 |
commit | f0e123add7e8023c6715ce483f94ace2d9a2dc72 (patch) | |
tree | 8082c4b3e19930de5764fde4d1881ef99e6ed412 /t_libreoffice_xrgb.c | |
parent | db8cdfda4ded5c94c76212e51c1bf903439ce52d (diff) |
Use ELF sections to make test setup easier.
Managing the group logic was really error-prone (forget to edit
success_mask when copy and pasting? Forget to printf a description of
the group?). Most new tests being written can be described as a single
call that does a couple subtests.
This doesn't convert all of the tests. Some of the remaining ones use
"win" for presenting results (which we may want to just put in a
global?), and the rest use the pre-created pictures, which would need
some much bigger refactoring if we want to move their test logic into
their test files.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 't_libreoffice_xrgb.c')
-rw-r--r-- | t_libreoffice_xrgb.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/t_libreoffice_xrgb.c b/t_libreoffice_xrgb.c index 9efca58..1398a01 100644 --- a/t_libreoffice_xrgb.c +++ b/t_libreoffice_xrgb.c @@ -39,8 +39,8 @@ #define PIXEL_ARGB 0xff886644 #define INVERT_PIXEL_ARGB 0xff7799bb -bool -libreoffice_xrgb_test(Display *dpy, bool invert) +static bool +libreoffice_xrgb_test_one(Display *dpy, bool invert) { int x, y; Pixmap src_pix, dst_pix; @@ -163,3 +163,17 @@ libreoffice_xrgb_test(Display *dpy, bool invert) return true; } + +static struct rendercheck_test_result +test_libreoffice_xrgb(Display *dpy) +{ + struct rendercheck_test_result result = { }; + + record_result(&result, libreoffice_xrgb_test_one(dpy, false)); + record_result(&result, libreoffice_xrgb_test_one(dpy, true)); + + return result; +} + +DECLARE_RENDERCHECK_ARG_TEST(libreoffice_xrgb, "LibreOffice xRGB", + test_libreoffice_xrgb); |