pike.git
/
src
/
modules
/
Image
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Image/testsuite.in:1:
START_MARKER
-
dnl
$Id: testsuite.in,v 1.27 2010/02/15 02:05:53 srb Exp $
+
dnl
$Id$
test_eq([[ Image.PNM.decode("P1\n5 5\n0 1 1 1 1\n1 0 1 1 1\n" "1 1 0 1 1\n1 1 1 0 1\n1 1 1 1 0") ]], Image.PNM.decode("P4\n5 5\nx¸Øèð") ) test_eq([[ Image.GIF.decode(MIME.decode_base64( "R0lGODlhBQAFAIAAAAAAAP///ywAAAAABQAFAAACCAxwEWrY8BwoADs=")) ]], Image.PNM.decode("P4\n5 5\nx\00èØèð") ) test_true( objectp(Image.Image()) )
pike.git/src/modules/Image/testsuite.in:93:
test_color( "white", 255, 255, 255, 0, 0, 255, 255 ) test_color( "yellow", 255, 255, 0, 42, 255, 255, 214 ) test_true( arrayp(indices(Image.Color)) ) test_true( stringp(indices(Image.Color)[0]) ) test_true( sizeof(indices(Image.Color))>8 ) test_true( arrayp(values(Image.Color)) ) test_true( objectp(values(Image.Color)[0]) ) test_eq( sizeof(indices(Image.Color)), sizeof(values(Image.Color)) )
+
test_eq( Image.Color(0xffffff), Image.Color.white )
+
test_eq( (int)Image.Color(0xabcdef), 0xabcdef )
define(test_img,[[ test_do([[ object img = Image.Image(100,100)->test(42); img->setpixel(2,2,0,255,0); add_constant("img", img); ]]) $1 test_do( add_constant("img") ) ]])