Created attachment 13979 [details] [review] patch The purpose is to reduce code duplication, in particular if we want to add 4 more similar tests for the LCD filtering stuff. I saw that "make check" accepts running more that one cairo_test in a single file. In this case the text-antialias test is generating 3 text-antialias-{none,gray,subpixe}.log files. However there are places where it is assumed that one test maps to only one .log file. This can be found in all make rules using the $(TESTS:$(EXEEXT)=.log) construct (check-local, html, ...). Should we try to get around this assumption? $(wildcard *.log) could be used instead, with the drawback that it could not detect tests that didn't generate .log files. Another way to reduce duplication could be to include a .h file from all these text-antialias-{none,gray,subpixel}.c files with the shared drawing function.
We're not quite ready to move to multiple tests per source file yet. That's planned though, for some time in the future...
The patch does not apply anymore, but the merge is possible. It has been performed in: commit ffdfdf2fa99dab340e03884267218b134d68265b Author: Andrea Canciani <ranma42@gmail.com> Date: Sat Jun 25 10:29:04 2011 +0200 test: Merge text-antialias-* The test-antialias-* tests perform the same operation with just a different antialias flag. Sharing the code ensures that they are kept in sync and permits adding new flags combinations easily. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=14268
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.