summaryrefslogtreecommitdiff
path: root/tests/test-common.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix some memory leaksSimon McVittie2020-12-121-1/+3
| | | | | | | | | This is enough to make many of the tests pass under gcc's AddressSanitizer. pixbuf-randomly-modified still fails when it cannot allocate more memory, and pixbuf-fail fails with memory allocation errors unless run with ASAN_OPTIONS=allocator_may_return_null=1. Signed-off-by: Simon McVittie <smcv@debian.org>
* tests: Don't depend on mime type detection without GDK_PIXBUF_USE_GIO_MIMEChristoph Reiter2018-12-111-1/+9
| | | | | | | When building without GDK_PIXBUF_USE_GIO_MIME detect the format based on the fill extension and not the mime type. This makes these tests pass on Windows.
* tests: Fix signed/unsigned handling in pixdata_equal()Philip Withnall2017-02-071-1/+5
| | | | | | | | | | The return values from the GdkPixbuf getters are signed, so assign them to signed variables and then check that the returned values are non-negative. Coverity IDs: 1388535, 1388536, 1388537 https://bugzilla.gnome.org/show_bug.cgi?id=777374
* tests: Move pixbuf creation helpers to test-common.[ch]Bastien Nocera2017-02-031-0/+58
| | | | | | Those will be used in the 2-step scaler tests. https://bugzilla.gnome.org/show_bug.cgi?id=80925
* tests: Fix non-sensical error in reftestBastien Nocera2016-12-291-4/+4
| | | | | | | | | The debug output was always printing the very first pixel of the line as both the reference and test data, leading to "useful" output like: Image data at 1x1 is #B16C42FF, but should be #B16C42FF Read the reference and test pixel values from the correct offset in the line to fix this.
* tests: Skip reftests for unsupported formatsBenjamin Otte2015-10-131-0/+15
|
* tests: Make add_test_for_all_images() GFile basedBenjamin Otte2015-10-131-16/+65
| | | | | Use that to make pixbuf-reftest accept arguments on the command line to specify a file to test.
* tests: Implement format_supported() differentlyBenjamin Otte2015-10-131-18/+12
| | | | | | | | | Instead of using strstr (filename, modulename); use has_suffix (filenname, extension_supported_by_module); That way, files can be named .jpg and .jpeg without things going wrong.
* tests: Allow passing a filter function when adding all filesBenjamin Otte2015-10-131-5/+9
| | | | ... and use it to not add reference images.
* test-common: Improve error mesages in pixdata_equal()Benjamin Otte2015-10-131-13/+35
| | | | When something differs, display the actual values
* test-common: Rename function argumentsBenjamin Otte2015-10-131-37/+50
| | | | | Instead of p1 and p2, name the arguments "test" and "ref". This makes the arguments more meaningful and easier to distinguish.
* test-common: If image data differs, output first coords that failBenjamin Otte2015-10-131-4/+27
|
* Add a helper to run tests over directoriesMatthias Clasen2015-10-131-0/+26
| | | | | This helper function recursively runs over a directory and adds a test function for each file in the tree.
* Skip tests when we can't run them due to lack of memoryIain Lane2015-09-221-0/+14
| | | | | | | Check if we have failed due to insufficient memory and skip if so. https://bugzilla.gnome.org/show_bug.cgi?id=754387
* tests: Add error reporting to pixdata_equal()Bastien Nocera2014-11-181-8/+22
|
* tests: Move pixdata_equal() to helpersBastien Nocera2014-11-181-0/+22
|
* Add TIFF image density metadata supportRobert Ancell2014-10-301-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=498721
* ico: Fix support for 256x256 iconsBastien Nocera2014-10-241-1/+1
| | | | | | | | | | In both loading and saving them. The ico format uses "0" as the width or height to mean 256: https://en.wikipedia.org/wiki/ICO_%28file_format%29#Icon_resource_structure Also add a test for that. https://bugzilla.gnome.org/show_bug.cgi?id=674724
* Make testsuite robust against disabled formatsMatthias Clasen2014-01-251-0/+65
Skip tests if their file format is not supported by the available loaders. https://bugzilla.gnome.org/show_bug.cgi?id=722651