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

version» Context lines:

pike.git/src/modules/Image/testsuite.in.in:1:   // -*- pike -*- - // $Id: testsuite.in.in,v 1.23 1999/10/16 08:10:00 mirar Exp $ + // $Id: testsuite.in.in,v 1.24 1999/10/18 20:23:11 mirar Exp $   #module Image.Image   {   //-----------------------------------------------------------------------   #chapter testsuite      #test Image.PNM.decode, ==    object img1=Image.PNM.decode("P1\n5 5\n0 1 1 1 1\n1 0 1 1 1\n1 1 0 1 1\n1 1 1 0 1\n1 1 1 1 0");    object img2=Image.PNM.decode("P4\n5 5\nx¸Øèð");    if (img1!=img2) fail("differ\n");    ok();
pike.git/src/modules/Image/testsuite.in.in:34:      #test Image.Image() image    object img=Image.Image(100,100);    if (!img ||    img->xsize()!=100 ||    img->ysize()!=100) fail("wrong size");    if (img!=0) fail("wrong color");    ok();      #test Image.Image() too big -  foreach ( ({0x3fffffff,0x1fffffff,0x10000000,0x7fffffff,0x7ffffffff, +  foreach ( ({0x7fffffff,0x7ffffffff,    0x7ffffffff,0x7fffffffff,0x7ffffffffff}),    int x)    if (x>0)    {    if (!catch { Image.Image(x,2); }) fail(x+"x2 permitted (This might be correct - do you have "+x+" *2*4 bytes of memory?)");    if (!catch { Image.Image(x/32768,65537); }) fail((x/32768)+"x65537 permitted");    if (!catch { Image.Image(x/(32768*3),65537); }) fail((x/(32768*3))+"x65537 permitted");    }    ok();