Skip to content
Snippets Groups Projects
Commit b27734c0 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

testsuite bugfix

Rev: src/modules/Image/module_testsuite.in:1.10
Rev: src/modules/Image/testsuite.in.in:1.18
parent 14ac620b
No related branches found
No related tags found
No related merge requests found
...@@ -478,7 +478,7 @@ if (sizeof(z)!=2) ...@@ -478,7 +478,7 @@ if (sizeof(z)!=2)
do { werror("failure; Image.image/Image.Colortable/colortable - black/white init & cast: "+( "didn't get two colors (black and white): "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white init & cast: "+( "didn't get two colors (black and white): "+((array(string))c)*", " )+"\n"); return 0; } while (0);
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
do { werror("failure; Image.image/Image.Colortable/colortable - black/white init & cast: "+( "didn't get black and white: "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white init & cast: "+( "didn't get black and white: "+((array(string))z)*", " )+"\n"); return 0; } while (0);
return 1; return 1;
} }
...@@ -496,10 +496,10 @@ object c=Image.Colortable(({Image.Color.white,Image.Color.black})); ...@@ -496,10 +496,10 @@ object c=Image.Colortable(({Image.Color.white,Image.Color.black}));
img=c*img; img=c*img;
array z=(array)Image.Colortable(img); array z=(array)Image.Colortable(img);
if (sizeof(z)!=2) if (sizeof(z)!=2)
do { werror("failure; Image.image/Image.Colortable/colortable - black/white normal: "+( "didn't get two colors (black and white): "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white normal: "+( "didn't get two colors (black and white): "+((array(string))z)*", " )+"\n"); return 0; } while (0);
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
do { werror("failure; Image.image/Image.Colortable/colortable - black/white normal: "+( "didn't get black and white: "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white normal: "+( "didn't get black and white: "+((array(string))z)*", " )+"\n"); return 0; } while (0);
return 1; return 1;
} }
...@@ -518,10 +518,10 @@ c->floyd_steinberg(); ...@@ -518,10 +518,10 @@ c->floyd_steinberg();
img=c*img; img=c*img;
array z=(array)Image.Colortable(img); array z=(array)Image.Colortable(img);
if (sizeof(z)!=2) if (sizeof(z)!=2)
do { werror("failure; Image.image/Image.Colortable/colortable - black/white floyd-steinberg: "+( "didn't get two colors (black and white): "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white floyd-steinberg: "+( "didn't get two colors (black and white): "+((array(string))z)*", " )+"\n"); return 0; } while (0);
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
do { werror("failure; Image.image/Image.Colortable/colortable - black/white floyd-steinberg: "+( "didn't get black and white: "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white floyd-steinberg: "+( "didn't get black and white: "+((array(string))z)*", " )+"\n"); return 0; } while (0);
return 1; return 1;
} }
...@@ -540,10 +540,10 @@ c->ordered(); ...@@ -540,10 +540,10 @@ c->ordered();
img=c*img; img=c*img;
array z=(array)Image.Colortable(img); array z=(array)Image.Colortable(img);
if (sizeof(z)!=2) if (sizeof(z)!=2)
do { werror("failure; Image.image/Image.Colortable/colortable - black/white ordered: "+( "didn't get two colors (black and white): "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white ordered: "+( "didn't get two colors (black and white): "+((array(string))z)*", " )+"\n"); return 0; } while (0);
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
do { werror("failure; Image.image/Image.Colortable/colortable - black/white ordered: "+( "didn't get black and white: "+((array(string))c)*", " )+"\n"); return 0; } while (0); do { werror("failure; Image.image/Image.Colortable/colortable - black/white ordered: "+( "didn't get black and white: "+((array(string))z)*", " )+"\n"); return 0; } while (0);
return 1; return 1;
} }
......
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
fail("didn't get two colors (black and white): "+((array(string))c)*", "); fail("didn't get two colors (black and white): "+((array(string))c)*", ");
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
fail("didn't get black and white: "+((array(string))c)*", "); fail("didn't get black and white: "+((array(string))z)*", ");
ok(); ok();
#test colortable - black/white normal #test colortable - black/white normal
...@@ -287,10 +287,10 @@ ...@@ -287,10 +287,10 @@
img=c*img; img=c*img;
array z=(array)Image.Colortable(img); array z=(array)Image.Colortable(img);
if (sizeof(z)!=2) if (sizeof(z)!=2)
fail("didn't get two colors (black and white): "+((array(string))c)*", "); fail("didn't get two colors (black and white): "+((array(string))z)*", ");
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
fail("didn't get black and white: "+((array(string))c)*", "); fail("didn't get black and white: "+((array(string))z)*", ");
ok(); ok();
#test colortable - black/white floyd-steinberg #test colortable - black/white floyd-steinberg
...@@ -300,10 +300,10 @@ ...@@ -300,10 +300,10 @@
img=c*img; img=c*img;
array z=(array)Image.Colortable(img); array z=(array)Image.Colortable(img);
if (sizeof(z)!=2) if (sizeof(z)!=2)
fail("didn't get two colors (black and white): "+((array(string))c)*", "); fail("didn't get two colors (black and white): "+((array(string))z)*", ");
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
fail("didn't get black and white: "+((array(string))c)*", "); fail("didn't get black and white: "+((array(string))z)*", ");
ok(); ok();
#test colortable - black/white ordered #test colortable - black/white ordered
...@@ -313,10 +313,10 @@ ...@@ -313,10 +313,10 @@
img=c*img; img=c*img;
array z=(array)Image.Colortable(img); array z=(array)Image.Colortable(img);
if (sizeof(z)!=2) if (sizeof(z)!=2)
fail("didn't get two colors (black and white): "+((array(string))c)*", "); fail("didn't get two colors (black and white): "+((array(string))z)*", ");
if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
(z[1]!=Image.Color.black || z[0]!=Image.Color.white)) (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
fail("didn't get black and white: "+((array(string))c)*", "); fail("didn't get black and white: "+((array(string))z)*", ");
ok(); ok();
#test colortable - standard #test colortable - standard
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment