From 874e9e0006bcd58126dfc84f73bcff1c9594fc8c Mon Sep 17 00:00:00 2001 From: Rafael Machado Dohms Date: Sun, 19 Jul 2009 01:44:19 +0000 Subject: [PATCH] Adding tests for imagecreatetruecolor for PHP_5_2 and trunk --- ext/gd/tests/imagecreatetruecolor_basic.phpt | 22 +++++++++++++++++ ext/gd/tests/imagecreatetruecolor_error1.phpt | 18 ++++++++++++++ ext/gd/tests/imagecreatetruecolor_error2.phpt | 24 +++++++++++++++++++ ext/gd/tests/imagecreatetruecolor_error3.phpt | 21 ++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 ext/gd/tests/imagecreatetruecolor_basic.phpt create mode 100644 ext/gd/tests/imagecreatetruecolor_error1.phpt create mode 100644 ext/gd/tests/imagecreatetruecolor_error2.phpt create mode 100644 ext/gd/tests/imagecreatetruecolor_error3.phpt diff --git a/ext/gd/tests/imagecreatetruecolor_basic.phpt b/ext/gd/tests/imagecreatetruecolor_basic.phpt new file mode 100644 index 0000000000..5c85f52380 --- /dev/null +++ b/ext/gd/tests/imagecreatetruecolor_basic.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing imagecreatetruecolor() of GD library +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECT-- +5a8fe9864cbd20e5dbe730c77f30db95 diff --git a/ext/gd/tests/imagecreatetruecolor_error1.phpt b/ext/gd/tests/imagecreatetruecolor_error1.phpt new file mode 100644 index 0000000000..facf2c894a --- /dev/null +++ b/ext/gd/tests/imagecreatetruecolor_error1.phpt @@ -0,0 +1,18 @@ +--TEST-- +Testing imagecreatetruecolor(): error on non-long parameters +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d + +Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d diff --git a/ext/gd/tests/imagecreatetruecolor_error2.phpt b/ext/gd/tests/imagecreatetruecolor_error2.phpt new file mode 100644 index 0000000000..e4de7e382d --- /dev/null +++ b/ext/gd/tests/imagecreatetruecolor_error2.phpt @@ -0,0 +1,24 @@ +--TEST-- +Testing imagecreatetruecolor(): error on out of bound parameters +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d + +Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d + +Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d + +Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d \ No newline at end of file diff --git a/ext/gd/tests/imagecreatetruecolor_error3.phpt b/ext/gd/tests/imagecreatetruecolor_error3.phpt new file mode 100644 index 0000000000..ade12ad718 --- /dev/null +++ b/ext/gd/tests/imagecreatetruecolor_error3.phpt @@ -0,0 +1,21 @@ +--TEST-- +Testing imagecreatetruecolor(): error on wrong parameter count +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: Wrong parameter count for imagecreatetruecolor() in %s on line %d + +Warning: Wrong parameter count for imagecreatetruecolor() in %s on line %d + +Warning: Wrong parameter count for imagecreatetruecolor() in %s on line %d \ No newline at end of file -- 2.50.1