summaryrefslogtreecommitdiff
path: root/test/fallback-resolution.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop the conditional inclusion of config.hEmmanuele Bassi2021-05-011-2/+0
| | | | | | | | | | | | We *always* generate this file, and we depend on its existence. The idea behind HAVE_CONFIG_H was being able to include random files from different projects, back in a time where "libraries" were literally just random files instead of actual shared objects. Since we're not in the '80s any more, and our build system(s) define HAVE_CONFIG_H *and* generate the config.h header file, we don't need a conditional guard around its inclusion.
* test : build fix when --enable-pdf=noRavi Nanjundappa2014-08-141-0/+5
| | | | | | | | | | | Though --enable-pdf=yes by default, when --enable-pdf=no, the cairo build fails due to unavailability of cairo-pdf.h and related cairo pdf's apis. The current changes fixes this issue by conditionally checking if PDF surface is enabled or not. Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Tested-by: Bryce Harrington <bryce@osg.samsung.com>
* test: Ensure output dirs exist, falling back to current dir if neededBryce W. Harrington2013-09-091-19/+1
| | | | | | | | | | | | | | This change makes several tests behave more like ps-eps.c, et al by making them attempt to mkdir "output", and in case of trouble use "." instead. filenames are now allocated at runtime due to this change, so ensure the corresponding free()'s are in place as well. This should facilitate running the test suite with a relative path outside cairo's source tree, such as when employing the CAIRO_REF_DIR environment variable. Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
* test: Add special cases for create-from-png and fallback-resolutionBryce W. Harrington2013-07-041-0/+1
| | | | | | | | | | | These tests use reference images somewhat differently from other tests, so treat them as special cases and avoid recommending deleting any of their files. Add TODO's to each test to rework them to be more consistent with other tests. Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* test: Refresh the fallback-resolution reference imagesChris Wilson2012-03-081-1/+19
| | | | | | | Despite copying across the font options from the PDF backend, it still looks like the image surface is override the glyph placement... Odd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* boilerplate: Remove unused thread id parameterAndrea Canciani2011-11-121-2/+0
| | | | | The thread id is not used anymore (it is always == 0), so it can be removed.
* test: Use ARRAY_LENGTH() macroAndrea Canciani2011-03-171-1/+1
| | | | | Some tests hand-code ARRAY_LENGTH(). It is now provided by cairo-test.h, so it can be reused.
* Change fallback resolution test to use resolutions in multiples of 72Adrian Johnson2010-11-281-17/+9
| | | | With integer aligned clipping the test output has no seams.
* Boilerplate: Set fallback resolution using force_fallbacks functionAdrian Johnson2010-11-281-3/+1
| | | | cairo_set_fallback_resolution() does not work when testing rgb24 surfaces
* test: Move all output below test/output/Chris Wilson2010-06-131-4/+26
| | | | | | make distcheck complains of remanents being left under test/ after a clean, notably the files used to check the capabilities of a similar surface and the fallback-resolution output.
* test-suite: add image_diff_is_failure() functionBenjamin Otte2010-04-281-2/+1
| | | | | This cleans the code and fixes a boolean logic error where this check was done manually.
* [test] Track XFAIL using expected results stored as xfail.pngChris Wilson2009-07-131-6/+8
| | | | | | | | | | | | | | | | Instead of tagging the sources, which is insensitive to changes, track the known failure modes by recording the current fail as an xfail.png reference. (We also introduce a new.png to track a fresh error, so that they are not lost in the noise of the old XFAILs and hopefully do not cause everyone to fret). As we have removed the XFAIL tagging we find, surprise surprise, that some tests are now working -- so review all the reference images (as also some .ref.png now should be .xfail.png). Note: I've only checked image,pdf,ps,svg. The test surfaces report some failures that probably need to addressed in source. I've not correct the changes for win32 and quartz. Nor fixed up the experimental backends.
* [test] Only run fallback-resolution for enabled targetsChris Wilson2009-06-291-0/+3
| | | | | A secondary check that both activates CAIRO_TEST_TARGET and prevents a NULL-deref with the null test surface.
* [test] Free ref_name in fallback-resolution.Chris Wilson2009-02-131-0/+2
| | | | Trivial leak of a few thousand bytes.
* [test] Trim the number of fallback resolutions tested.Chris Wilson2008-12-121-101/+121
| | | | | Simplify the test matrix to only include testing the fallback-resolution of a uniform scale in one or both axes.
* [test] Fix memleak from fallback-resolution.Chris Wilson2008-12-121-0/+2
| | | | The test-name was being recreated for every pass, but was never freed.
* [test] Use '.' as the field separator in the namesChris Wilson2008-10-311-5/+6
| | | | | | | | | We frequently use '-' within the test name or format name and so we encounter confusion as '-' is also used as the field separator. At times this has caused a new test to break an old test because the new test would match one of the old test's target specific reference images. So switch everything over to use '.' between fields (test name, target, format, subtest, etc.).
* [test] Build test suite into single binary.Chris Wilson2008-10-311-13/+15
| | | | | | | | | Avoid calling libtool to link every single test case, by building just one binary from all the sources. This binary is then given the task of choosing tests to run (based on user selection and individual test requirement), forking each test into its own process and accumulating the results.
* Revert unintended changes to test/fallback-resolution.c in the previous commitAdrian Johnson2008-10-161-1/+1
|
* Use correct inverse ctm for stroke in meta surface replayAdrian Johnson2008-10-161-1/+1
| | | | This fixes #9189 Dashed strokes too long in fallback images
* [test/fallback-resolution] Extend to cover separate ppi x/y.Chris Wilson2008-10-141-96/+103
| | | | | | | | Adrian Johnson proposed a hack that fixed the current test by simply scaling the dashed stroke by device_transform.xx. Obviously this exposes a deficiency in the test case. So add an outer loop to iterate over several common ppi for both x and y and in doing so reveal more ugly artifacts in the current fallback code.
* [test/fallback-resolution] Exercise a couple of outstanding bugs.Chris Wilson2008-09-281-2/+38
| | | | | | | | | | | Use dashes to exercise bugs: https://bugs.freedesktop.org/show_bug.cgi?id=9189 https://bugs.freedesktop.org/show_bug.cgi?id=17223 Note bug 17223 indicates that this is still relevant for win32 printing where fallbacks are used if the dash offset is non-zero. And use a pattern to exercise the (fixed) regression: https://bugs.launchpad.net/inkscape/+bug/234546
* Automate error checking for fallback-resolution.Chris Wilson2008-09-281-104/+309
| | | | | | | | | | | For this we extend the boilerplate get_image() routines to extract a single page out of a paginated document and then proceed to manually check each page of the fallback-resolution test. (Well that's the theory, in practice SVG doesn't support multiple pages and so we just generate a new surface for each resolution. But the infrastructure is in place so that we can automate other tests, e.g. test/multi-pages.)
* [test] Fix target specific tests for recent SVG/PS version split.Chris Wilson2008-09-271-2/+6
| | | | | | A few tests explicitly checked whether the "ps" or "svg" target was enabled and this broke because of the name change. So fixup, to run the generic test if either PS or SVG target is enabled as appropriate.
* [test] Run fallback-resolution if we have at least one vector surface.Chris Wilson2008-08-131-2/+24
| | | | | | | Currently fallback-resolution is included in the test suite if we have all of the vector surfaces available. This commit enables individual support for the vector surfaces, so that the test can be run even if one or more of the surfaces are not available.
* [test] Set CAIRO_TEST_UNTESTED to 77Chris Wilson2008-08-131-1/+4
| | | | | 77 is the magic exit code used by automake to indicate a skipped test, so by using it we can get a slightly more informative test log.
* [test] Export a function to check whether a target is enabled.Chris Wilson2008-08-131-11/+20
| | | | | | Allow individuals tests to check whether a test target is enabled - useful for those tests that circumvent cairo_test() and perform feature testing.
* [test] Preparatory work for running under memfault.Chris Wilson2008-08-131-3/+4
| | | | | | | | | | | | | | | | | | | | In order to run under memfault, the framework is first extended to handle running concurrent tests - i.e. multi-threading. (Not that this is a requirement for memfault, instead it shares a common goal of storing per-test data). To that end all the global data is moved into a per-test context and the targets are adjusted to avoid overlap on shared, global resources (such as output files and frame buffers). In order to preserve the simplicity of the standard draw routines, the context is not passed explicitly as a parameter to the routines, but is instead attached to the cairo_t via the user_data. For the masochist, to enable the tests to be run across multiple threads simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired number. In the long run, we can hope the need for memfault (runtime testing of error paths) will be mitigated by static analysis. A promising candidate for this task would appear to be http://hal.cs.berkeley.edu/cil/.
* Extend fallback-resolution test to expose bug with groupsCarl Worth2008-05-211-1/+27
| | | | | Groups appear to always be rendered with a fallback resolution of 72.0 ppi rather than the desired fallback resolution.
* [test/fallback-resolution] set tolerance to a large value to see how it performsBehdad Esfahbod2007-11-051-0/+1
| | | | in different fallback resolutions.
* [test] fallback-resolution: center textBehdad Esfahbod2007-11-051-1/+4
|
* [test/fallback-resolution] Cleanup after test failureChris Wilson2007-05-081-2/+4
| | | | Be valgrind clean even for test failures.
* [svg] Get rid of _cairo_svg_test_force_fallbacksBehdad Esfahbod2007-04-211-2/+2
| | | | in favor of cairo_boilerplate_svg_surface_force_fallbacks.
* [ps] Get rid of _cairo_ps_test_force_fallbacksBehdad Esfahbod2007-04-211-2/+2
| | | | in favor of cairo_boilerplate_ps_surface_force_fallbacks.
* [pdf] Get rid of _cairo_pdf_test_force_fallbacksBehdad Esfahbod2007-04-211-2/+2
| | | | in favor of cairo_boilerplate_pdf_surface_force_fallbacks.
* More tightening of test cleanup to avoid valgrind complaints.Carl Worth2007-03-021-0/+2
|
* Use SVG multipage capability.Emmanuel Pacaud2006-11-121-30/+3
|
* Eliminate most compiler warnings from the test suiteCarl Worth2006-08-081-1/+1
|
* More test suite infrastructure improvements:Behdad Esfahbod2006-07-111-3/+3
| | | | | | | | | | | | | | | | | - Remove cairo_test_expect_failure. cairo-test.c now checks env var CAIRO_XFAIL_TESTS to see if the running test is expected to fail. The reason for expected failure is appended to the test description. - Test description is written out. - Failed/crashed tests also write a line out to stderr (in red), so one can now redirect stdout to /dev/null to only see failures. - cairo_test() has been changed to not take the draw function anymore, instead, draw function is now part of the test struct. - "make check" doesn't allow limiting backends to test using env var anymore. To limit backends to test, one should use the TARGETS variable on the make command line. - "make check-valgrind" now writes its log to valgrind-log instead of valgrind.log, to not interfere with test log file processing.
* Prefix "cairo_*_test_*" symbols with underscore.Behdad Esfahbod2006-06-291-3/+3
|
* test/fallback-resolution: Remove extra call to cairo_show_pageCarl Worth2006-06-191-2/+0
|
* Clarify that fallback_resolution acts on a per-page granularity.Carl Worth2006-06-101-0/+16
| | | | | This explains why the SVG result from the fallback-resolution test doesn't actually show multiple resolutions in effect at the same time.
* Test PS and SVG backends in addition to PDF in test/fallback-resolution.Carl Worth2006-06-101-31/+81
|
* Add text and stroke to falback-resolution test (showing bugs in each).Carl Worth2006-06-101-7/+35
|
* New API: Replace cairo_{ps,pdf,svg}_set_dpi with new ↵Carl Worth2006-06-091-1/+1
| | | | | | | | | cairo_surface_set_fallback_resolution. This just provides the mechanics for storing the value and removing the old function calls. The new value is still not used anywhere (though nor where the old values), so there should be no functional change (other than forcing any programs calling the old API to be updated).
* Add new fallback-resolution test for bug in cairo_pdf_surface_set_dpiCarl Worth2006-05-241-0/+84