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

version» Context lines:

pike.git/src/modules/Image/testsuite.in.in:239:    ({20+x,30+2*15+y,25+x,30+2*15+y,20+x,30+2*10+y}),    ({10+x,30+2*20+y,15+x,30+2*20+y,15+x,30+2*25+y}),    ({20+x,30+2*25+y,25+x,30+2*20+y,20+x,30+2*20+y}));       object img1=Image.GIF.decode(MIME.decode_base64(    "R0lGODlhZABkANUAAAAAAAICAgUFBQcHBwoKChQUFBYWFh4eHiMjIyYmJS0tLTAwMDMyMigoKFFRUFlYWHp5eX9+fnJycYyLi56dnDIyMqOioaWlpMHBwMvLyszLytHQz9bV1Orp6Ojn5vTz8vz7+v/+/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAZABkAAUG/0AAQDgcFo1GZDK5ZDKdz2dUKqVWq1csVrvddr1ecDg8JpPN53NarWa32284XD6f1+12fD6/5/P9f3+BgoKEhYVqAkmKiGQEWAMBjW0FFEkMEZNYBhMYWBUcD5KaWwUbGZchmaRGnB8hqFUVISGho6xJprCpqqyutLuywLWiuEO6wUMMwKuIv8OxUrPDxLeTAhQZGRkWSQ3b2w6FAQ8Y4ODcWN/o4BYNxsbw8fHz9PT29/f5ggIMDP7vjBD49w/BuAUECf4LKGWgQoUHWEUAFg3AMlodFCBqcAEEtWRPplHzIOGRRFoVL2bUxNEjxU8jS9KbmDLESlYtUcKkRdLkvf8IKW8aa1mRyaye+pKIM4JAo74GELAkkJk0aVWrVrFmzbqVK1evX7+GFSuWbNmyZ9GiVbt2bVu3buHGjTuXLl27d+/m1auXb9++fwEDFjx4cGHDhvlYs5b43oMkCxg2jmfAkxEGFybfm5AShGTNmgx8qJkZNKsJIJd5Nh36Vc0QpVkjQp2a1mrZgkTrvAwsNu48tGvb/vxbDQFz27oZWbctavHiz6FDlz59enXr1rFnz152QIUK3yUTAA8+AfczATi85A1MwvkzD9YrA+bB5/st6XfPp+X+Ppn4wtXnHxn5vdbfgGHEV5OACIaRXk0HNujFAykxKKEXASinTIQXbiEk2QH2ddihiCOOWKKJJqKYYoorssiiiy++GKOMMtJYY4034hYEADs="));    if (!(img-img1<16)) fail("differ too much");    if (!equal(img->max(),({255,254,253}))) fail("wrong maxcolor");    ok();    + //----------------------------------------------------- + #chapter Image.Font    -  + #test instansiating default font +  if (!objectp(Image.Font())) fail("not object"); +  ok();    -  + #test writing simple text with default font +  object f=Image.Font(); +  object i=f->write("hej"); +  if (i!=Image.PNM.decode(MIME.decode_base64("UDQKMTkgMTEK///gv/7gv//grzjglt7gth7gtv7gtv7gtx7g//7g//Hg"))) +  fail("incorrect"); +  ok(); +  + #test writing multiple lines with default font +  object f=Image.Font(); +  object i=f->write("h","o"); +  if (i!=Image.PNM.decode(MIME.decode_base64("UDQKNyAyMwr+vr6ulra2trb+/v7+/s62tra2zv7+/g=="))) +  fail("incorrect"); +  ok(); +  +    //----------------------------------------------------- - #chapter colortable + #chapter Image.Colortable      #test colortable - black/white init & cast    object c=Image.Colortable(({Image.Color.white,Image.Color.black}));    array z=(array)c;    if (sizeof(z)!=2)    fail("didn't get two colors (black and white): "+((array(string))c)*", ");    if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&    (z[1]!=Image.Color.black || z[0]!=Image.Color.white))    fail("didn't get black and white: "+((array(string))c)*", ");    ok();
pike.git/src/modules/Image/testsuite.in.in:653:       Stinares=Stina->match_phase(0.00002, Stinamini);    expected_result=Image.JPEG.decode(MIME.decode_base64(   "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIA\r\nAhEBAxEB/8QAGgABAQEBAAMAAAAAAAAAAAAAAAYFAgEDCP/EACUQAAEDAgUFAQEAAAAAAAAAAAAB\r\nAgQFogMREiHRExVDUVMxM//EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMEBf/EACQRAAEDAgYDAQEA\r\nAAAAAAAAAAEAAgQDEQUGFFFx0RIxkWEh/9oADAMBAAIRAxEAPwD5/Bs0iDGkxXPxsPU5HqmepU2y\r\nT0aSUSE5M24FzuTM+UxhsV2Y+ByZFMVGEWPPSlAVC0eE39wL3cnPaYXwvdyRq2bFWHL8oe3N+npT\r\nIKdKRCXwXu5OuzQvje7kNWz9UjL0o+i36elLAp1pMFPBe7ky6vEwIvR6LNOrVnuq+vY7JDXu8Qs0\r\nnB68akaryLDa+9tl7aTOjxYrmYuJpcr1XLSq7ZIaDazDb57XcEuCHxmOJJTx8bkUKYpsAsOe1Tur\r\nEJfNa7g8d2hfax3BMgXSM3KtOYJR/vi34e1TJV4SL/a1eDt1Zhqm2PavBLANIz9QMwygLAN+HtUv\r\ndYX3tdwZtXl4Ero9F+rTqz2VPXszAOyO1jvILPJxevIpGk8Cx553QAF65SAAEIAAQgABC//Z"   ));       if (!(Stinares-expected_result<80))    fail("->match_phase(float f, object needle) differ too much");       /* -  This is used to create more tests. Please don't remove! +  This is used to create more tests. Please don't remMIME.encode_base64ove!       MIME.encode_base64(Image.JPEG.encode(Stinares));    */      ok();