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

version» Context lines:

pike.git/src/modules/Image/testsuite.in.in:33:   #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    int x=1; while ((x<<1)>0) x=(x<<1)+1; -  if (!catch { Image.image(x,2); } || -  !catch { Image.image(x/32768,32769); }) fail("permitted"); +  if (!catch { Image.image(x,2); }) fail(x+"x2 permitted"); +  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();      #test Image.image() color    object img=Image.image(1000,1000,17,42,96);    if (!img ||    img->xsize()!=1000 ||    img->ysize()!=1000) fail("wrong size");    if (img!=({17,42,96})) fail("wrong color");    ok();