Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
521e5ca5
Commit
521e5ca5
authored
26 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
Updated to the new class names.
Rev: src/modules/Image/testsuite.in.in:1.12
parent
1279047d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/Image/testsuite.in.in
+19
-19
19 additions, 19 deletions
src/modules/Image/testsuite.in.in
with
19 additions
and
19 deletions
src/modules/Image/testsuite.in.in
+
19
−
19
View file @
521e5ca5
...
...
@@ -399,7 +399,7 @@ ok();
#test colortable - standard
object img=Image.image(200,200)->test(42);
img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));
object c=Image.
c
olortable(img,1000)->cubicles(16,16,16,4);
object c=Image.
C
olortable(img,1000)->cubicles(16,16,16,4);
if (sizeof(c)<200) fail("too few colors");
object img1=(c*img);
if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
...
...
@@ -408,7 +408,7 @@ ok();
#test colortable - floyd-steinberg
object img=Image.image(200,200)->test(42);
img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));
object c=Image.
c
olortable(32,32,32)->floyd_steinberg();
object c=Image.
C
olortable(32,32,32)->floyd_steinberg();
object img1=(c*img);
if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
ok();
...
...
@@ -416,7 +416,7 @@ ok();
#test colortable - ordered
object img=Image.image(200,200)->test(42);
img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));
object c=Image.
c
olortable(32,32,32)->ordered();
object c=Image.
C
olortable(32,32,32)->ordered();
object img1=(c*img);
if (!(img-img1<32)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
ok();
...
...
@@ -433,7 +433,7 @@ ok();
#test Image.GIF.encode/decode
object img=Image.image(100,100)->test(41);
object c=Image.
c
olortable(img,250)->cubicles(10,10,10,1)->floyd_steinberg();
object c=Image.
C
olortable(img,250)->cubicles(10,10,10,1)->floyd_steinberg();
img=c*img;
object img1=Image.GIF.decode(Image.GIF.encode(img));
if (img!=img1) fail("differ ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
...
...
@@ -441,7 +441,7 @@ ok();
#test Image.GIF.encode/decode colortable
object img=Image.image(100,100)->test(42);
object c=Image.
c
olortable(img,256)->cubicles(16,16,16,1);
object c=Image.
C
olortable(img,256)->cubicles(16,16,16,1);
img=c*img;
object img1=Image.GIF.decode(Image.GIF.encode(img,c));
if (img!=img1) fail("differ ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
...
...
@@ -449,16 +449,16 @@ ok();
#test Image.GIF.encode/decode colortable w/ floyd-steinberg
object img=Image.image(100,100)->test(43);
object c=Image.
c
olortable(img,256)->floyd_steinberg()->cubicles(16,16,16);
object c=Image.
C
olortable(img,256)->floyd_steinberg()->cubicles(16,16,16);
img=c*img;
object img1=Image.GIF.decode(Image.GIF.encode(img,c));
if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
ok();
//-----------------------------------------------------
#chapter Image.
c
olor
#chapter Image.
C
olor
#test Image.
c
olor
#test Image.
C
olor
foreach (
({ ({ "black", ({ 0, 0, 0 }), ({ 0, 0, 0 }), 0 }),
({ "blue", ({ 0, 0, 255 }), ({ 170, 255, 255 }), 41 }),
...
...
@@ -470,9 +470,9 @@ ok();
({ "yellow", ({ 255, 255, 0 }), ({ 42, 255, 255 }), 214 }) }),
array i)
{
object c1=Image.
c
olor(i[0]);
object c2=Image.
c
olor(@i[1]);
object c3=Image.
c
olor.rgb(@i[1]);
object c1=Image.
C
olor(i[0]);
object c2=Image.
C
olor(@i[1]);
object c3=Image.
C
olor.rgb(@i[1]);
if (c1!=c2)
fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+
...
...
@@ -520,20 +520,20 @@ ok();
};
ok();
#test indices(Image.
c
olor)
if (!arrayp(indices(Image.
c
olor)))
#test indices(Image.
C
olor)
if (!arrayp(indices(Image.
C
olor)))
fail("wrong type\n");
if (!stringp(indices(Image.
c
olor)[0]))
if (!stringp(indices(Image.
C
olor)[0]))
fail("wrong type of elements\n");
if (sizeof(indices(Image.
c
olor))<8)
if (sizeof(indices(Image.
C
olor))<8)
fail("too few colors\n");
ok();
#test values(Image.
c
olor)
if (!arrayp(values(Image.
c
olor)))
#test values(Image.
C
olor)
if (!arrayp(values(Image.
C
olor)))
fail("wrong type\n");
if (!objectp(values(Image.
c
olor)[0]))
if (!objectp(values(Image.
C
olor)[0]))
fail("wrong type of elements\n");
if (sizeof(indices(Image.
c
olor))!=sizeof(values(Image.
c
olor)))
if (sizeof(indices(Image.
C
olor))!=sizeof(values(Image.
C
olor)))
fail("not the same size of indices() and values()\n");
ok();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment