Branch: Tag:

2012-02-11

2012-02-11 13:56:18 by Marcus Comstedt <marcus@mc.pp.se>

Image: Skip tests on PNG if it's not available (no Gz)

806:    img=c*img;   ]],)    + cond_resolv( Image.PNG.decode_header, [[    test_equal( Image.PNG.decode_header(Image.PNG.encode(Image.Image(20,20))),    (["bpp":8, "type":2, "xsize":20, "ysize":20 ]) ) -  + ]])    -  + cond_resolv( Image.PNG.encode, [[   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])) )
822:   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])) ) +  test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.HUFFMAN_ONLY])) ) + ]]) +  + dnl ACK! cond_resolv does not nest. But if Gz.RLE or Gz.FIXED exists, it + dnl means the Gz module is there, and in that case Image.PNG should be too...   cond_resolv( 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_resolv( Gz.FIXED, [[    test_true( Image.PNG.encode(Image.Image(5,5), (["zstrategy":Gz.FIXED])) )   ]])