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

version» Context lines:

pike.git/src/modules/Image/testsuite.in:1: - // $Id: testsuite.in,v 1.6 1998/04/16 00:38:58 mirar Exp $ + // $Id: testsuite.in,v 1.7 1998/04/16 01:57:04 mirar Exp $      cond([[ master()->resolv("Image")->image ]],   [[    test_true(programp(Image.image))    test_true(objectp(clone(Image.image))) -  test_true(objectp(Image.image(,10,10))) -  test_true(objectp(Image.image(,10,10,1,1,1))) -  test_eq(Image.image(,10,12)->xsize(),10)) -  test_eq(Image.image(,10,12)->ysize(),12)) -  test_true(objectp(Image.image(,10,10,1,1,1)->copy())) -  test_eq(Image.image(,10,12)->copy()->xsize(),10)) -  test_eq(Image.image(,10,12)->copy()->ysize(),12)) - dnl test_true(objectp(Image.image(,10,10)->crop(2,2,3,3))) -  test_true(objectp(Image.image(,10,10)->autocrop())) -  test_true(objectp(Image.image(,10,10)->gray())) -  test_true(objectp(Image.image(,10,10)->color(2,2,4))) -  test_true(objectp(Image.image(,10,10)->invert())) -  test_true(objectp(Image.image(,10,10)->threshold(10,20,30))) +  test_true(objectp(clone(Image.image,10,10))) +  test_true(objectp(clone(Image.image,10,10,1,1,1))) +  test_eq(clone(Image.image,10,12)->xsize(),10)) +  test_eq(clone(Image.image,10,12)->ysize(),12)) +  test_true(objectp(clone(Image.image,10,10,1,1,1)->copy())) +  test_eq(clone(Image.image,10,12)->copy()->xsize(),10)) +  test_eq(clone(Image.image,10,12)->copy()->ysize(),12)) + dnl test_true(objectp(clone(Image.image,10,10)->crop(2,2,3,3))) +  test_true(objectp(clone(Image.image,10,10)->autocrop())) +  test_true(objectp(clone(Image.image,10,10)->gray())) +  test_true(objectp(clone(Image.image,10,10)->color(2,2,4))) +  test_true(objectp(clone(Image.image,10,10)->invert())) +  test_true(objectp(clone(Image.image,10,10)->threshold(10,20,30)))   dnl matrix -  test_true(objectp(Image.image(,10,10)->scale(2.1))) -  test_eq(Image.image(,10,12)->scale(2.0)->xsize(),20) -  test_eq(Image.image(,10,12)->scale(2.0)->ysize(),24) -  test_true(objectp(Image.image(,10,10)->scale(0.2))) -  test_true(objectp(Image.image(,10,10)->scale(2.0,0.2))) -  test_true(objectp(Image.image(,10,10)->scale(0.2,2.2))) -  test_true(objectp(Image.image(,10,10)->scale(0.2,2.2))) -  test_true(objectp(Image.image(,10,10)->scale(0.2,2.2))) -  test_eq(Image.image(,10,10)->scale(33,57)->xsize(),33) -  test_eq(Image.image(,10,10)->scale(33,57)->ysize(),57) -  test_true(stringp(Image.image(,10,10)->toppm())) +  test_true(objectp(clone(Image.image,10,10)->scale(2.1))) +  test_eq(clone(Image.image,10,12)->scale(2.0)->xsize(),20) +  test_eq(clone(Image.image,10,12)->scale(2.0)->ysize(),24) +  test_true(objectp(clone(Image.image,10,10)->scale(0.2))) +  test_true(objectp(clone(Image.image,10,10)->scale(2.0,0.2))) +  test_true(objectp(clone(Image.image,10,10)->scale(0.2,2.2))) +  test_true(objectp(clone(Image.image,10,10)->scale(0.2,2.2))) +  test_true(objectp(clone(Image.image,10,10)->scale(0.2,2.2))) +  test_eq(clone(Image.image,10,10)->scale(33,57)->xsize(),33) +  test_eq(clone(Image.image,10,10)->scale(33,57)->ysize(),57) +  test_true(stringp(clone(Image.image,10,10)->toppm()))   dnl fromppm -  test_true(stringp(Image.image(,10,10)->toppm())) -  test_true(stringp(Image.image(,10,10)->togif())) -  test_true(objectp(Image.image(,10,10)->paste(Image.image(,3,3),2,3))) +  test_true(stringp(clone(Image.image,10,10)->toppm())) +  test_true(stringp(clone(Image.image,10,10)->togif())) +  test_true(objectp(clone(Image.image,10,10)->paste(clone(Image.image,3,3),2,3)))   dnl past_alpha   dnl past_mask -  test_do(Image.image(,10,10)->setcolor(2,2,2)) -  test_do(Image.image(,10,10)->setpixel(2,2,2,2,2)) -  test_do(Image.image(,10,10)->line(2,2,4,4,2,2,2)) -  test_do(Image.image(,10,10)->box(2,2,4,4,2,2,2)) -  test_do(Image.image(,10,10)->circle(2,2,4,4,2,2,2)) +  test_do(clone(Image.image,10,10)->setcolor(2,2,2)) +  test_do(clone(Image.image,10,10)->setpixel(2,2,2,2,2)) +  test_do(clone(Image.image,10,10)->line(2,2,4,4,2,2,2)) +  test_do(clone(Image.image,10,10)->box(2,2,4,4,2,2,2)) +  test_do(clone(Image.image,10,10)->circle(2,2,4,4,2,2,2))   dnl tuned_box -  test_eq(Image.image(,10,10)->xsize(),10) -  test_eq(Image.image(,10,10)->ysize(),10) +  test_eq(clone(Image.image,10,10)->xsize(),10) +  test_eq(clone(Image.image,10,10)->ysize(),10)    test_do(clone(Image.font))    test_do(clone(Image.font)->load("SRCDIR/testfont")) -  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); -  return o->height(), -  19) -  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); -  return o->write("foo")->xsize(),23) -  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); -  return o->write("foo")->ysize(),19) - dnl test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); o->write("foo"); Image.image(,100,100)->paste_alpha(o); return 1,1) +  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); return o->height(),19) +  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); return o->write("foo")->xsize(),23) +  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); return + o->write("foo")->ysize(),19) + dnl test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); o->write("foo"); clone(Image.image,100,100)->paste_alpha(o); return 1,1)   ]])