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.24 2009/07/22 20:42:08 nilsson Exp $ + dnl $Id: testsuite.in,v 1.25 2009/08/10 15:56:51 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:801:   dnl img=c*img;   dnl ]],)   test_encoding(XBM,[[    object c=Image.Colortable(({Image.Color.white,Image.Color.black}));    img=c*img;   ]],)      test_equal( Image.PNG.decode_header(Image.PNG.encode(Image.Image(20,20))),   (["bpp":8, "type":2, "xsize":20, "ysize":20 ]) )    + test_true( Image.PNG.encode(Image.Image(5,5)) ) + test_true( Image.PNG.encode(Image.Image(5,5), ([])) ) + test_true( Image.PNG.encode(Image.Image(5,5), (["alpha":0])) ) + test_eval_error( Image.PNG.encode(Image.Image(5,5), (["alpha":"x"])) ) + test_eval_error( Image.PNG.encode(Image.Image(5,5), (["alpha":Image.Image(4,4)])) ) + test_true( Image.PNG.encode(Image.Image(5,5), (["alpha":Image.Image(5,5)])) ) + dnl FIXME: Test that alpha is actually encoded + dnl FIXME: Test "palette" attribute + test_eval_error( Image.PNG.encode(Image.Image(5,5), (["zlevel":"x"])) ) + test_true( Image.PNG.encode(Image.Image(5,5), (["zlevel":0])) ) + test_true( Image.PNG.encode(Image.Image(5,5), (["zlevel":9])) ) + test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.DEFAULT_STRATEGY])) ) + test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.FILTERED])) ) + cond( Gz.RLE, [[ +  test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.RLE])) ) + ]]) + test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.HUFFMAN_ONLY])) ) + cond( Gz.FIXED, [[ +  test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.FIXED])) ) + ]]) +    cond( (master()->resolv("Image.XFace")||([]))->encode,[[    test_any([[    object img=Image.Image(48,48)->test(43);    object c=Image.Colortable(({Image.Color.white,Image.Color.black}));    c->floyd_steinberg();    img=c*img;    return Image.XFace.decode(Image.XFace.encode(img))==img;    ]],1)   ]])      test_encoding(XPM,[[    object c=Image.Colortable(16,16,16);    img=c*img;   ]],[[,(["colortable":c]) ]])   test_encoding(TIFF,,)   END_MARKER