pike.git / src / modules / Image / testsuite.in

version» Context lines:

pike.git/src/modules/Image/testsuite.in:1:   START_MARKER - dnl $Id: testsuite.in,v 1.21 2005/08/14 02:22:09 nilsson Exp $ + dnl $Id: testsuite.in,v 1.22 2006/07/26 19:24:00 nilsson Exp $      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:617:   test_do( add_constant("img") )            test_true( objectp(Image.Font()) )   test_eq( Image.Font()->write("hej"),    Image.PNM.decode(MIME.decode_base64("UDQKMTkgMTEK///gv/7gv//grzjglt7gth7gtv7gtv7gtx7g//7g//Hg")) )   test_eq( Image.Font()->write("h","o"),    Image.PNM.decode(MIME.decode_base64("UDQKNyAyMwr+vr6ulra2trb+/v7+/s62tra2zv7+/g==")) )    +  + dnl #### Colortable +  +    define(test_blackwhite,[[    test_equal_any($1,[[ (< Image.Color.white, Image.Color.black >) ]])   ]])   test_blackwhite([[    return (multiset)(array)Image.Colortable(    ({Image.Color.white,Image.Color.black}))   ]])   test_blackwhite([[    object img=Image.Image(100,100)->test(43);    object c=Image.Colortable(({Image.Color.white,Image.Color.black}));
pike.git/src/modules/Image/testsuite.in:681:   ]])      test_coltab([[    test_do([[    add_constant("c", Image.Colortable(32,32,32)->ordered())    ]])    test_true( img-(c*img)<32 )    test_do( add_constant("c") )   ]])    + test_true( Image.Colortable(Image.Image(10,10)->randomgrey())->greyp() ) + test_false( Image.Colortable(Image.Image(10,10,255,0,0))->greyp() )    -  +  + dnl #### Encodings +    define(test_encoding,[[    cond( (master()->resolv("Image.$1")||([]))->encode,[[    test_any([[    object img=Image.Image(100,100)->test(40);    $2    object img1=Image.$1.decode(Image.$1.encode(img$3));    return img==img1;    ]],1)    ]])   ]])