Commit Graph

35 Commits (6013c7bcf6eb795dba584f92d3824ebd3ae60202)

Author SHA1 Message Date
wilson chen 3f50ffaefd
Fixed #596: gdTransformAffineCopy run error
And add test case for it.
2020-03-21 15:31:40 +08:00
wilson chen b1151dedb1
tests: Correct some test depend errors 2020-01-02 20:27:29 +08:00
Mike Frysinger aac77143dd convert all files to native line encodings
A bunch of these files were committed with Windows line encodings.
Strip all those ^M gremlins out as people working on Windows can
use git's autocrlf setting to convert back and forth as needed.
2018-06-21 21:44:54 -04:00
Mike Frysinger 00bbb69cc3 tests: add more checks for libpng (and other deps)
This fixes #382.
2017-02-23 17:31:41 -05:00
Mike Frysinger 12a0f039b3 tests: sync feature enable lists in cmake files #382 2017-02-15 11:14:25 -05:00
Christoph M. Becker 5292ba3c12 Fix whitespace and add missing comment block 2016-10-03 19:38:18 +02:00
Christoph M. Becker 65d40f5aa5 Fix #319: gdImageRotateInterpolated can have wrong background color
We backport the fix for <https://bugs.php.net/65070>, and also the fix for
<https://bugs.php.net/70976> which was introduced by fixing 65070.
2016-10-03 16:19:19 +02:00
Christoph M. Becker e210ff1149 Partially implement #220: tests: replace all printf error messages with gdTestErrorMsg 2016-07-15 14:59:21 +02:00
Mike Frysinger 3bb6aac422 tests: cmake: switch to list appending
This makes it a bit cleaner when dealing with optional tests as we
use the LIST(APPEND...) command everywhere instead of sometimes SET
and sometimes LIST.
2016-06-15 15:02:13 -04:00
Mike Frysinger 93bd6d5428 tests: bug00067: revert test code back to pre-merge of 0b9fe91679 2016-06-15 12:18:13 -04:00
Christoph M. Becker 2f79735f3c Fix broken gdimagerotate/bug00067.c test
Sorry, I skrewed up when merging (commit 0b9fe91).
2016-06-15 18:12:59 +02:00
Christoph M. Becker 0b9fe91679 Merge branch 'GD-2.2'
# resolved conflicts:
#	tests/gdimagerotate/bug00067.c
2016-06-15 17:55:38 +02:00
Mike Frysinger d01056211e tests: add helpers for accessing test data
A lot of tests want to read images/fonts that exist in tests/ for reading.
Rather than construct these paths by hand in every single test file, add a
few helper functions to quickly access them.

The helper functions are slightly slower (due to the repeated calls to the
strcat func), but they aren't terribly slow, especially relative to image
loading that these tests perform.  They also make writing/maintaining the
tests a lot easier which is more important here.

Fixes #231.
2016-06-15 10:01:20 -04:00
Pierre Joye b7ce38e95b Merge branch 'GD-2.2'
* GD-2.2:
  update dist file
2016-06-15 10:38:06 +07:00
Pierre Joye da440a6e63 update dist file 2016-06-15 10:37:44 +07:00
Pierre Joye ec26bba81d fix bad merge 2016-06-15 10:33:08 +07:00
Pierre Joye e22448e6dd Merge branch 'GD-2.2'
* GD-2.2:
  fix #227 drop usage of GD_BILINEAR_FIXED and GD_BICUBIC_FIXED for gdImageRotateInterpolated, the quality does not match expectation. It is also trickier to maintain for little gain. The generic method is used and will be optimized for 2.3 to match fixed pt performance, if necessary. Also use png for comparison to avoid jpeg artifact, making impossible to exactly  compare results
  fix #227 drop usage of GD_BILINEAR_FIXED and GD_BICUBIC_FIXED for gdImageRotateInterpolated, the quality does not match expectation. It is also trickier to maintain for little gain. The generic method is used and will be optimized for 2.3 to match fixed pt performance, if necessary. Also use png for comparison to avoid jpeg artifact, making impossible to exactly  compare results
  fix #227 drop usage of GD_BILINEAR_FIXED and GD_BICUBIC_FIXED for gdImageRotateInterpolated, the quality does not match expectation. It is also trickier to maintain for little gain. The generic method is used and will be optimized for 2.3 to match fixed pt performance, if necessary. Also use png for comparison to avoid jpeg artifact, making impossible to exactly  compare results
  WS
  #230 fix crash on fail
  gdTestAssert should not accept any message. Also crashes if assert failed

Conflicts:
	tests/gdimagerotate/bug00067.c
	tests/gdtest/gdtest.c
2016-06-15 09:53:28 +07:00
Pierre Joye 630a4ac4ce fix #227 drop usage of GD_BILINEAR_FIXED and GD_BICUBIC_FIXED for gdImageRotateInterpolated, the quality does not match expectation. It is also trickier to maintain for little gain. The generic method is used and will be optimized for 2.3 to match fixed pt performance, if necessary. Also use png for comparison to avoid jpeg artifact, making impossible to exactly compare results 2016-06-15 09:38:43 +07:00
Pierre Joye bd6d2e101f fix #227 drop usage of GD_BILINEAR_FIXED and GD_BICUBIC_FIXED for gdImageRotateInterpolated, the quality does not match expectation. It is also trickier to maintain for little gain. The generic method is used and will be optimized for 2.3 to match fixed pt performance, if necessary. Also use png for comparison to avoid jpeg artifact, making impossible to exactly compare results 2016-06-15 09:38:22 +07:00
Pierre Joye a0ab07761e Merge branch 'GD-2.2'
* GD-2.2:
  fix #224 and fix #225 and overal quality are significantly improved, code much simpler as well
2016-06-12 13:41:17 +07:00
Pierre Joye 6267414dc2 fix #224 and fix #225 and overal quality are significantly improved, code much simpler as well 2016-06-12 13:40:15 +07:00
Mike Frysinger d6c50766ee tests: add helpers for accessing test data
A lot of tests want to read images/fonts that exist in tests/ for reading.
Rather than construct these paths by hand in every single test file, add a
few helper functions to quickly access them.

The helper functions are slightly slower (due to the repeated calls to the
strcat func), but they aren't terribly slow, especially relative to image
loading that these tests perform.  They also make writing/maintaining the
tests a lot easier which is more important here.
2016-06-03 20:31:02 -04:00
Mike Frysinger 75c38f6b32 fix various gcc/clang warnings found with -Wall 2016-05-13 22:19:26 -04:00
Mike Frysinger 0315e441ec tests: gd2: add general read test helpers #208
Since we have random files we want to read & check, turn the two
read programs into general tools.  Then we have shell scripts to
run against the right inputs.

Most of the changes here are just shuffling variable names so we
can add to check_PROGRAMS independently of TESTS.
2016-04-30 21:52:45 -04:00
Mike Frysinger 613e8c93e3 tests: split up makefile entries
This matches what we've done with cmake files, and it makes managing
the subdirs much easier.
2016-04-30 21:02:45 -04:00
Mike Frysinger adc8598dcb tests: unify cmake test code into a single macro
This makes the test code a lot easier to manage rather than copying &
pasting the same boiler plate multiple times.

Also take the opportunity to add a common prefix to each test name so
we don't get collisions between subdirs if a test happens to use the
same exact name.
2016-04-30 21:02:45 -04:00
Mike Frysinger 4c6a07b263 gitignore: split up test entries
This makes it easier to keep track of things.  The single toplevel list
can make it hard to notice when something is stale.
2016-04-30 13:56:19 -04:00
Nathanael Jones b52b9c5579 Upgrade to long-syntax CMAKE add_test command to improve cross-platform compatibility. 2015-01-07 01:39:10 -05:00
Pierre Joye aaf607e38d add new tests 2013-06-10 08:38:58 +02:00
Pierre Joye 3cc4314804 fix test, keep ANSI C pls 2013-06-10 08:36:49 +02:00
Pierre Joye b10c7763e5 simplify and fix test 2013-06-06 08:38:31 +02:00
Pierre Joye 1e09060f05 add gdImageClone, use gdImageClone for 0 degree rotation, fix expected images for bug00067 test 2013-06-06 08:27:32 +02:00
Ondřej Surý b47e37d8ae Add another test for correct angle for gdImageRotateInterpolated 2013-05-28 11:10:14 +02:00
Ondřej Surý fe49d7c604 Use gdImageDestroy instead of gdFree 2013-05-28 10:54:48 +02:00
Ondřej Surý 030f1d1549 Move new test to gdimagerotate dir to allow adding more tests 2013-05-28 10:49:26 +02:00