- Reestructuración de ficheros y directorios general
- merge v0.01 --> Añadido fileselector - Añadidas fuentes de Gem y Pure Data - pix2jpg incluído en Gem. Archivos de construcción de Gem modificados. - Añadido fichero ompiling.txt con instrucciones de compilación
This commit is contained in:
parent
c9adfd020b
commit
e85d191b46
3100 changed files with 775434 additions and 3073 deletions
40
Gem/tests/README.txt
Normal file
40
Gem/tests/README.txt
Normal file
|
@ -0,0 +1,40 @@
|
|||
regression tests for Gem
|
||||
|
||||
|
||||
tests are pd-patches living in subdirectories from here
|
||||
|
||||
naming conventions:
|
||||
subdirectories:
|
||||
named after the (main) object to be tested
|
||||
e.g. gemframebuffer/ tests problems in [gemframebuffer]
|
||||
|
||||
tests:
|
||||
tests starting with "crash_" are supposed to crash Pd
|
||||
tests starting with "fail_" are supposed to fail the unit-test
|
||||
all other tests are supposed to survive and pass the test
|
||||
|
||||
|
||||
unit-tests:
|
||||
starting the test:
|
||||
each unit-test get's called with a uniq-ID as first argument
|
||||
it is supposed to create a receiver using this uniq-ID as follows
|
||||
[r $1-start]
|
||||
when a bang is received on this label, the test must start
|
||||
evaluating the test:
|
||||
each unit-test is supposed to create a sender using the uniq-ID:
|
||||
[s $1-result]
|
||||
the unit test can send 3 results to this label:
|
||||
0: the test has failed
|
||||
1: the test has passed
|
||||
-1: wait, not yet finished!
|
||||
running the test:
|
||||
when a "bang" is received at "$1-start", the test has to start and
|
||||
_immediately_ return one of the 3 results to "$1-result"
|
||||
if the test fails to immediately return a result, it is considered
|
||||
as FAILED and the test-run is stopped (the unit-test is deleted!)
|
||||
if the test needs some time to evaluate, it MUST send "-1" as a result
|
||||
in which case the test-engine is paused and waits for a proper result
|
||||
(0 or 1) in order to continue
|
||||
|
||||
|
||||
|
3
Gem/tests/all/existence.bat
Normal file
3
Gem/tests/all/existence.bat
Normal file
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
|
||||
pd -stderr -nogui -path .. -path ../../examples/data -path ../abstractions -lib Gem -open existence.pd -send "pd quit" > existence.log 2>&1
|
64
Gem/tests/all/existence.pd
Normal file
64
Gem/tests/all/existence.pd
Normal file
|
@ -0,0 +1,64 @@
|
|||
#N canvas 491 140 934 677 10;
|
||||
#N canvas 22 516 450 300 1002-creator 0;
|
||||
#X restore 265 34 pd \$0-creator;
|
||||
#X obj 178 199 textfile;
|
||||
#X msg 213 156 read objects.txt \, rewind;
|
||||
#X msg 152 149 bang;
|
||||
#X obj 152 171 until;
|
||||
#X msg 174 107 bang;
|
||||
#X obj 174 129 t b b b;
|
||||
#X obj 262 200 i \$0;
|
||||
#X obj 262 224 makefilename pd-%d-creator;
|
||||
#X obj 65 18 loadbang;
|
||||
#X obj 432 304 print creating;
|
||||
#X obj 213 459 print destroying;
|
||||
#X obj 65 48 t b b;
|
||||
#X obj 65 85 print done;
|
||||
#X msg 138 18 bang;
|
||||
#X obj 386 326 list prepend obj 100 100;
|
||||
#X obj 386 408 list trim;
|
||||
#X obj 361 303 t b a b;
|
||||
#X msg 463 407 set \, addsemi;
|
||||
#X msg 262 499 set \, addsemi \, add \$1 clear;
|
||||
#X obj 178 243 t a a;
|
||||
#X obj 361 279 t a a;
|
||||
#X obj 178 434 t b a;
|
||||
#X obj 386 388 list trim;
|
||||
#X obj 386 348 list prepend add pd-$0-creator;
|
||||
#X msg 621 326 list add \$1;
|
||||
#X obj 361 436 t a;
|
||||
#X msg 361 459;
|
||||
#X msg 178 533;
|
||||
#X connect 1 0 20 0;
|
||||
#X connect 1 1 4 1;
|
||||
#X connect 2 0 1 0;
|
||||
#X connect 3 0 4 0;
|
||||
#X connect 4 0 1 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 6 0 3 0;
|
||||
#X connect 6 1 2 0;
|
||||
#X connect 6 2 7 0;
|
||||
#X connect 7 0 8 0;
|
||||
#X connect 8 0 19 0;
|
||||
#X connect 8 0 25 0;
|
||||
#X connect 9 0 12 0;
|
||||
#X connect 12 0 13 0;
|
||||
#X connect 12 1 5 0;
|
||||
#X connect 14 0 12 0;
|
||||
#X connect 15 0 24 0;
|
||||
#X connect 16 0 26 0;
|
||||
#X connect 17 0 26 0;
|
||||
#X connect 17 1 15 0;
|
||||
#X connect 17 2 18 0;
|
||||
#X connect 18 0 26 0;
|
||||
#X connect 19 0 28 0;
|
||||
#X connect 20 0 22 0;
|
||||
#X connect 20 1 21 0;
|
||||
#X connect 21 0 17 0;
|
||||
#X connect 21 1 10 0;
|
||||
#X connect 22 0 28 0;
|
||||
#X connect 22 1 11 0;
|
||||
#X connect 23 0 16 0;
|
||||
#X connect 24 0 23 0;
|
||||
#X connect 25 0 24 1;
|
||||
#X connect 26 0 27 0;
|
10
Gem/tests/all/existence.sh
Executable file
10
Gem/tests/all/existence.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
if test "x${PD}" = "x"
|
||||
then
|
||||
PD=pd
|
||||
fi
|
||||
|
||||
${PD} -stderr -nogui -path ../../src:../../examples/data -lib Gem -open existence.pd -send "pd quit"> existence.log 2>&1
|
||||
|
||||
cat existence.log | egrep -v "^creating: " | egrep -v "^destroying"
|
495
Gem/tests/all/objects.txt
Normal file
495
Gem/tests/all/objects.txt
Normal file
|
@ -0,0 +1,495 @@
|
|||
gemframebuffer;
|
||||
gemhead;
|
||||
gemkeyboard;
|
||||
gemkeyname;
|
||||
gemlist_info;
|
||||
gemmouse;
|
||||
gemwin;
|
||||
render_trigger;
|
||||
circle;
|
||||
colorSquare;
|
||||
cone;
|
||||
cube;
|
||||
cuboid;
|
||||
curve3d;
|
||||
curve 6;
|
||||
cylinder;
|
||||
disk;
|
||||
GemSplash;
|
||||
imageVert;
|
||||
model;
|
||||
multimodel;
|
||||
newWave;
|
||||
polygon 100;
|
||||
pqtorusknots;
|
||||
primTri;
|
||||
rectangle;
|
||||
ripple;
|
||||
rubber;
|
||||
scopeXYZ;
|
||||
slideSquares;
|
||||
sphere;
|
||||
square;
|
||||
teapot;
|
||||
text2d;
|
||||
text3d;
|
||||
textextruded;
|
||||
textoutline;
|
||||
torus;
|
||||
triangle;
|
||||
tube;
|
||||
accumrotate;
|
||||
alpha;
|
||||
ambient;
|
||||
ambientRGB;
|
||||
camera;
|
||||
color;
|
||||
colorRGB;
|
||||
depth;
|
||||
diffuse;
|
||||
diffuseRGB;
|
||||
emission;
|
||||
emissionRGB;
|
||||
fragment_program;
|
||||
glsl_fragment;
|
||||
glsl_program;
|
||||
glsl_vertex;
|
||||
linear_path;
|
||||
ortho;
|
||||
polygon_smooth;
|
||||
rotate;
|
||||
rotateXYZ;
|
||||
scale;
|
||||
scaleXYZ;
|
||||
separator;
|
||||
shearXY;
|
||||
shearXZ;
|
||||
shearYX;
|
||||
shearYZ;
|
||||
shearZX;
|
||||
shearZY;
|
||||
shininess;
|
||||
specular;
|
||||
specularRGB;
|
||||
spline_path;
|
||||
translate;
|
||||
translateXYZ;
|
||||
vertex_program;
|
||||
light;
|
||||
spot_light;
|
||||
world_light;
|
||||
GEMglAccum;
|
||||
GEMglActiveTextureARB;
|
||||
GEMglAlphaFunc;
|
||||
GEMglAreTexturesResident;
|
||||
GEMglArrayElement;
|
||||
GEMglBegin;
|
||||
GEMglBindProgramARB;
|
||||
GEMglBindTexture;
|
||||
GEMglBitmap;
|
||||
GEMglBlendEquation;
|
||||
GEMglBlendFunc;
|
||||
GEMglCallList;
|
||||
GEMglClearAccum;
|
||||
GEMglClearColor;
|
||||
GEMglClear;
|
||||
GEMglClearDepth;
|
||||
GEMglClearIndex;
|
||||
GEMglClearStencil;
|
||||
GEMglClipPlane;
|
||||
GEMglColor3b;
|
||||
GEMglColor3bv;
|
||||
GEMglColor3d;
|
||||
GEMglColor3dv;
|
||||
GEMglColor3f;
|
||||
GEMglColor3fv;
|
||||
GEMglColor3i;
|
||||
GEMglColor3iv;
|
||||
GEMglColor3s;
|
||||
GEMglColor3sv;
|
||||
GEMglColor3ub;
|
||||
GEMglColor3ubv;
|
||||
GEMglColor3ui;
|
||||
GEMglColor3uiv;
|
||||
GEMglColor3us;
|
||||
GEMglColor3usv;
|
||||
GEMglColor4b;
|
||||
GEMglColor4bv;
|
||||
GEMglColor4d;
|
||||
GEMglColor4dv;
|
||||
GEMglColor4f;
|
||||
GEMglColor4fv;
|
||||
GEMglColor4i;
|
||||
GEMglColor4iv;
|
||||
GEMglColor4s;
|
||||
GEMglColor4sv;
|
||||
GEMglColor4ub;
|
||||
GEMglColor4ubv;
|
||||
GEMglColor4ui;
|
||||
GEMglColor4uiv;
|
||||
GEMglColor4us;
|
||||
GEMglColor4usv;
|
||||
GEMglColorMask;
|
||||
GEMglColorMaterial;
|
||||
GEMglCopyPixels;
|
||||
GEMglCopyTexImage1D;
|
||||
GEMglCopyTexImage2D;
|
||||
GEMglCopyTexSubImage1D;
|
||||
GEMglCopyTexSubImage2D;
|
||||
GEMglCullFace;
|
||||
GEMglDeleteTextures;
|
||||
GEMglDepthFunc;
|
||||
GEMglDepthMask;
|
||||
GEMglDepthRange;
|
||||
GEMglDisableClientState;
|
||||
GEMglDisable;
|
||||
GEMglDrawArrays;
|
||||
GEMglDrawBuffer;
|
||||
GEMglDrawElements;
|
||||
GEMglEdgeFlag;
|
||||
GEMglEnableClientState;
|
||||
GEMglEnable;
|
||||
GEMglEnd;
|
||||
GEMglEndList;
|
||||
GEMglEvalCoord1d;
|
||||
GEMglEvalCoord1dv;
|
||||
GEMglEvalCoord1f;
|
||||
GEMglEvalCoord1fv;
|
||||
GEMglEvalCoord2d;
|
||||
GEMglEvalCoord2dv;
|
||||
GEMglEvalCoord2f;
|
||||
GEMglEvalCoord2fv;
|
||||
GEMglEvalMesh1;
|
||||
GEMglEvalMesh2;
|
||||
GEMglEvalPoint1;
|
||||
GEMglEvalPoint2;
|
||||
GEMglFeedbackBuffer;
|
||||
GEMglFinish;
|
||||
GEMglFlush;
|
||||
GEMglFogf;
|
||||
GEMglFogfv;
|
||||
GEMglFogi;
|
||||
GEMglFogiv;
|
||||
GEMglFrontFace;
|
||||
GEMglFrustum;
|
||||
GEMglGenLists;
|
||||
GEMglGenProgramsARB;
|
||||
GEMglGenTextures;
|
||||
GEMglGetError;
|
||||
GEMglGetFloatv;
|
||||
GEMglGetMapdv;
|
||||
GEMglGetMapfv;
|
||||
GEMglGetMapiv;
|
||||
GEMglGetPointerv;
|
||||
GEMglGetString;
|
||||
GEMglHint;
|
||||
GEMglIndexd;
|
||||
GEMglIndexdv;
|
||||
GEMglIndexf;
|
||||
GEMglIndexfv;
|
||||
GEMglIndexi;
|
||||
GEMglIndexiv;
|
||||
GEMglIndexMask;
|
||||
GEMglIndexs;
|
||||
GEMglIndexsv;
|
||||
GEMglIndexub;
|
||||
GEMglIndexubv;
|
||||
GEMglInitNames;
|
||||
GEMglIsEnabled;
|
||||
GEMglIsList;
|
||||
GEMglIsTexture;
|
||||
GEMglLightf;
|
||||
GEMglLighti;
|
||||
GEMglLightModelf;
|
||||
GEMglLightModeli;
|
||||
GEMglLineStipple;
|
||||
GEMglLineWidth;
|
||||
GEMglLoadIdentity;
|
||||
GEMglLoadMatrixd;
|
||||
GEMglLoadMatrixf;
|
||||
GEMglLoadName;
|
||||
GEMglLoadTransposeMatrixd;
|
||||
GEMglLoadTransposeMatrixf;
|
||||
GEMglLogicOp;
|
||||
GEMglMap1d;
|
||||
GEMglMap1f;
|
||||
GEMglMap2d;
|
||||
GEMglMap2f;
|
||||
GEMglMapGrid1d;
|
||||
GEMglMapGrid1f;
|
||||
GEMglMapGrid2d;
|
||||
GEMglMapGrid2f;
|
||||
GEMglMaterialf;
|
||||
GEMglMateriali;
|
||||
GEMglMatrixMode;
|
||||
GEMglMultiTexCoord2fARB;
|
||||
GEMglMultMatrixd;
|
||||
GEMglMultMatrixf;
|
||||
GEMglMultTransposeMatrixd;
|
||||
GEMglMultTransposeMatrixf;
|
||||
GEMglNewList;
|
||||
GEMglNormal3b;
|
||||
GEMglNormal3bv;
|
||||
GEMglNormal3d;
|
||||
GEMglNormal3dv;
|
||||
GEMglNormal3f;
|
||||
GEMglNormal3fv;
|
||||
GEMglNormal3i;
|
||||
GEMglNormal3iv;
|
||||
GEMglNormal3s;
|
||||
GEMglNormal3sv;
|
||||
GEMglOrtho;
|
||||
GEMglPassThrough;
|
||||
GEMglPixelStoref;
|
||||
GEMglPixelStorei;
|
||||
GEMglPixelTransferf;
|
||||
GEMglPixelTransferi;
|
||||
GEMglPixelZoom;
|
||||
GEMglPointSize;
|
||||
GEMglPolygonMode;
|
||||
GEMglPolygonOffset;
|
||||
GEMglPopAttrib;
|
||||
GEMglPopClientAttrib;
|
||||
GEMglPopMatrix;
|
||||
GEMglPopName;
|
||||
GEMglPrioritizeTextures;
|
||||
GEMglProgramEnvParameter4dARB;
|
||||
GEMglProgramEnvParameter4fvARB;
|
||||
GEMglProgramLocalParameter4fvARB;
|
||||
GEMglProgramStringARB;
|
||||
GEMglPushAttrib;
|
||||
GEMglPushClientAttrib;
|
||||
GEMglPushMatrix;
|
||||
GEMglPushName;
|
||||
GEMglRasterPos2d;
|
||||
GEMglRasterPos2dv;
|
||||
GEMglRasterPos2f;
|
||||
GEMglRasterPos2fv;
|
||||
GEMglRasterPos2i;
|
||||
GEMglRasterPos2iv;
|
||||
GEMglRasterPos2s;
|
||||
GEMglRasterPos2sv;
|
||||
GEMglRasterPos3d;
|
||||
GEMglRasterPos3dv;
|
||||
GEMglRasterPos3f;
|
||||
GEMglRasterPos3fv;
|
||||
GEMglRasterPos3i;
|
||||
GEMglRasterPos3iv;
|
||||
GEMglRasterPos3s;
|
||||
GEMglRasterPos3sv;
|
||||
GEMglRasterPos4d;
|
||||
GEMglRasterPos4dv;
|
||||
GEMglRasterPos4f;
|
||||
GEMglRasterPos4fv;
|
||||
GEMglRasterPos4i;
|
||||
GEMglRasterPos4iv;
|
||||
GEMglRasterPos4s;
|
||||
GEMglRasterPos4sv;
|
||||
GEMglRectd;
|
||||
GEMglRectf;
|
||||
GEMglRecti;
|
||||
GEMglRects;
|
||||
GEMglRenderMode;
|
||||
GEMglRotated;
|
||||
GEMglRotatef;
|
||||
GEMglScaled;
|
||||
GEMglScalef;
|
||||
GEMglScissor;
|
||||
GEMglSelectBuffer;
|
||||
GEMglShadeModel;
|
||||
GEMglStencilFunc;
|
||||
GEMglStencilMask;
|
||||
GEMglStencilOp;
|
||||
GEMglTexCoord1d;
|
||||
GEMglTexCoord1dv;
|
||||
GEMglTexCoord1f;
|
||||
GEMglTexCoord1fv;
|
||||
GEMglTexCoord1i;
|
||||
GEMglTexCoord1iv;
|
||||
GEMglTexCoord1s;
|
||||
GEMglTexCoord1sv;
|
||||
GEMglTexCoord2d;
|
||||
GEMglTexCoord2dv;
|
||||
GEMglTexCoord2f;
|
||||
GEMglTexCoord2fv;
|
||||
GEMglTexCoord2i;
|
||||
GEMglTexCoord2iv;
|
||||
GEMglTexCoord2s;
|
||||
GEMglTexCoord2sv;
|
||||
GEMglTexCoord3d;
|
||||
GEMglTexCoord3dv;
|
||||
GEMglTexCoord3f;
|
||||
GEMglTexCoord3fv;
|
||||
GEMglTexCoord3i;
|
||||
GEMglTexCoord3iv;
|
||||
GEMglTexCoord3s;
|
||||
GEMglTexCoord3sv;
|
||||
GEMglTexCoord4d;
|
||||
GEMglTexCoord4dv;
|
||||
GEMglTexCoord4f;
|
||||
GEMglTexCoord4fv;
|
||||
GEMglTexCoord4i;
|
||||
GEMglTexCoord4iv;
|
||||
GEMglTexCoord4s;
|
||||
GEMglTexCoord4sv;
|
||||
GEMglTexEnvf;
|
||||
GEMglTexEnvi;
|
||||
GEMglTexGend;
|
||||
GEMglTexGenf;
|
||||
GEMglTexGenfv;
|
||||
GEMglTexGeni;
|
||||
GEMglTexParameterf;
|
||||
GEMglTexParameteri;
|
||||
GEMglTexSubImage1D;
|
||||
GEMglTexSubImage2D;
|
||||
GEMglTranslated;
|
||||
GEMglTranslatef;
|
||||
GEMglUniform1fARB;
|
||||
GEMgluPerspective;
|
||||
GEMglUseProgramObjectARB;
|
||||
GEMglVertex2d;
|
||||
GEMglVertex2dv;
|
||||
GEMglVertex2f;
|
||||
GEMglVertex2fv;
|
||||
GEMglVertex2i;
|
||||
GEMglVertex2iv;
|
||||
GEMglVertex2s;
|
||||
GEMglVertex2sv;
|
||||
GEMglVertex3d;
|
||||
GEMglVertex3dv;
|
||||
GEMglVertex3f;
|
||||
GEMglVertex3fv;
|
||||
GEMglVertex3i;
|
||||
GEMglVertex3iv;
|
||||
GEMglVertex3s;
|
||||
GEMglVertex3sv;
|
||||
GEMglVertex4d;
|
||||
GEMglVertex4dv;
|
||||
GEMglVertex4f;
|
||||
GEMglVertex4fv;
|
||||
GEMglVertex4i;
|
||||
GEMglVertex4iv;
|
||||
GEMglVertex4s;
|
||||
GEMglVertex4sv;
|
||||
GEMglViewport;
|
||||
GLdefine;
|
||||
part_color;
|
||||
part_damp;
|
||||
part_draw;
|
||||
part_follow;
|
||||
part_gravity;
|
||||
part_head;
|
||||
part_info;
|
||||
part_killold;
|
||||
part_killslow;
|
||||
part_orbitpoint;
|
||||
part_render;
|
||||
part_sink;
|
||||
part_size;
|
||||
part_source;
|
||||
part_targetcolor;
|
||||
part_targetsize;
|
||||
part_velocity;
|
||||
part_vertex;
|
||||
pix_2grey;
|
||||
pix_a_2grey;
|
||||
pix_add;
|
||||
pix_aging;
|
||||
pix_alpha;
|
||||
pix_background;
|
||||
pix_backlight;
|
||||
pix_biquad;
|
||||
pix_bitmask;
|
||||
pix_blob;
|
||||
pix_blur;
|
||||
pix_buf;
|
||||
pix_buffer depot 100;
|
||||
pix_buffer_read depot;
|
||||
pix_buffer_write depot;
|
||||
pix_chroma_key;
|
||||
pix_clearblock;
|
||||
pix_coloralpha;
|
||||
pix_color;
|
||||
pix_colormatrix;
|
||||
pix_colorreduce;
|
||||
pix_compare;
|
||||
pix_composite;
|
||||
pix_contrast;
|
||||
pix_convert;
|
||||
pix_convolve 3 3;
|
||||
pix_coordinate;
|
||||
pix_crop;
|
||||
pix_curve rgba;
|
||||
pix_curve red green blue;
|
||||
pix_curve red green blue alpha;
|
||||
pix_data;
|
||||
pix_deinterlace;
|
||||
pix_delay;
|
||||
pix_diff;
|
||||
pix_dot;
|
||||
pix_draw;
|
||||
pix_dump;
|
||||
pix_duotone;
|
||||
pix_emboss;
|
||||
pix_fiducialtrack;
|
||||
pix_film;
|
||||
pix_flip;
|
||||
pix_freeframe bla;
|
||||
pix_gain;
|
||||
pix_grey;
|
||||
pix_halftone;
|
||||
pix_histo bla;
|
||||
pix_hit;
|
||||
pix_hsv2rgb;
|
||||
pix_image;
|
||||
pix_imageInPlace;
|
||||
pix_info;
|
||||
pix_invert;
|
||||
pix_kaleidoscope;
|
||||
pix_levels;
|
||||
pix_lumaoffset;
|
||||
pix_mask;
|
||||
pix_mean_color;
|
||||
pix_metaimage;
|
||||
pix_mix;
|
||||
pix_motionblur;
|
||||
pix_movement2;
|
||||
pix_movement;
|
||||
pix_movie;
|
||||
pix_multiblob;
|
||||
pix_multiimage;
|
||||
pix_multiply;
|
||||
pix_multitexture 2;
|
||||
pix_normalize;
|
||||
pix_offset;
|
||||
pix_pix2sig;
|
||||
pix_posterize;
|
||||
pix_puzzle;
|
||||
pix_rds;
|
||||
pix_record;
|
||||
pix_rectangle;
|
||||
pix_refraction;
|
||||
pix_resize;
|
||||
pix_rgb2hsv;
|
||||
pix_rgba;
|
||||
pix_roll;
|
||||
pix_rtx;
|
||||
pix_scanline;
|
||||
pix_set;
|
||||
pix_share_read namedSegment 128 128 RGBA;
|
||||
pix_share_write namedSegment 128 128 RGBA;
|
||||
pix_sig2pix;
|
||||
pix_snap2tex;
|
||||
pix_snap;
|
||||
pix_subtract;
|
||||
pix_takealpha;
|
||||
pix_test;
|
||||
pix_texture;
|
||||
pix_threshold_bernsen;
|
||||
pix_threshold;
|
||||
pix_tIIR;
|
||||
pix_video;
|
||||
pix_vpaint;
|
||||
pix_write;
|
||||
pix_yuv;
|
||||
pix_zoom 10;
|
1
Gem/tests/crashers.txt
Normal file
1
Gem/tests/crashers.txt
Normal file
|
@ -0,0 +1 @@
|
|||
gemframebuffer/crash_renderonoff
|
BIN
Gem/tests/data/colorstripes.png
Normal file
BIN
Gem/tests/data/colorstripes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 283 B |
43
Gem/tests/gemframebuffer/crash_renderonoff.pd
Normal file
43
Gem/tests/gemframebuffer/crash_renderonoff.pd
Normal file
|
@ -0,0 +1,43 @@
|
|||
#N canvas 657 144 465 485 10;
|
||||
#X obj 192 413 gemhead 20;
|
||||
#X msg 224 134 destroy;
|
||||
#X msg 236 118 reset \, create \, 1;
|
||||
#X obj 192 430 gemframebuffer;
|
||||
#X msg 216 152 create;
|
||||
#X msg 196 246 1;
|
||||
#X obj 171 228 t b b;
|
||||
#X obj 171 73 t b b b b;
|
||||
#X obj 203 97 del 100;
|
||||
#X obj 171 210 del 300;
|
||||
#X obj 187 117 del 200;
|
||||
#X msg 171 51 bang;
|
||||
#X obj 236 266 t a a;
|
||||
#X obj 236 337 gemwin;
|
||||
#X obj 261 283 print 2gemwin;
|
||||
#X obj 210 34 r \$1-send;
|
||||
#X obj 149 333 s \$1-receive;
|
||||
#X msg 149 316 1;
|
||||
#X msg 177 316 -1;
|
||||
#X obj 210 51 t b b;
|
||||
#X connect 0 0 3 0;
|
||||
#X connect 1 0 12 0;
|
||||
#X connect 2 0 12 0;
|
||||
#X connect 4 0 12 0;
|
||||
#X connect 5 0 12 0;
|
||||
#X connect 6 0 17 0;
|
||||
#X connect 6 1 5 0;
|
||||
#X connect 7 0 9 0;
|
||||
#X connect 7 1 10 0;
|
||||
#X connect 7 2 8 0;
|
||||
#X connect 7 3 2 0;
|
||||
#X connect 8 0 1 0;
|
||||
#X connect 9 0 6 0;
|
||||
#X connect 10 0 4 0;
|
||||
#X connect 11 0 7 0;
|
||||
#X connect 12 0 13 0;
|
||||
#X connect 12 1 14 0;
|
||||
#X connect 15 0 19 0;
|
||||
#X connect 17 0 16 0;
|
||||
#X connect 18 0 16 0;
|
||||
#X connect 19 0 7 0;
|
||||
#X connect 19 1 18 0;
|
105
Gem/tests/pix_2grey/greytest.pd
Normal file
105
Gem/tests/pix_2grey/greytest.pd
Normal file
|
@ -0,0 +1,105 @@
|
|||
#N canvas 280 190 826 638 10;
|
||||
#X obj 48 117 gemwin;
|
||||
#X msg 48 55 reset \, dimen 300 300 \, create \, 1;
|
||||
#X msg 68 84 destroy;
|
||||
#X obj 322 154 gemhead;
|
||||
#X obj 322 183 pix_image;
|
||||
#X msg 395 154 thread 0 \, open ../data/colorstripes.png;
|
||||
#X obj 291 42 t b b;
|
||||
#X obj 294 21 loadbang;
|
||||
#X obj 340 323 pix_separator;
|
||||
#X obj 340 303 separator;
|
||||
#X obj 340 366 pix_2grey;
|
||||
#X obj 340 346 pix_rgba;
|
||||
#X obj 340 387 pix_texture;
|
||||
#X obj 490 323 pix_separator;
|
||||
#X obj 490 303 separator;
|
||||
#X obj 490 366 pix_2grey;
|
||||
#X obj 490 387 pix_texture;
|
||||
#X obj 490 346 pix_yuv;
|
||||
#X obj 340 416 translateXYZ -2 -2 0;
|
||||
#X obj 40 323 pix_separator;
|
||||
#X obj 40 303 separator;
|
||||
#X obj 40 387 pix_texture;
|
||||
#X obj 190 323 pix_separator;
|
||||
#X obj 190 303 separator;
|
||||
#X obj 190 387 pix_texture;
|
||||
#X obj 190 346 pix_grey;
|
||||
#X obj 232 225 t a a a a;
|
||||
#X obj 40 416 translateXYZ -2 2 0;
|
||||
#X obj 190 416 translateXYZ 2 2 0;
|
||||
#X obj 490 416 translateXYZ 2 -2 0;
|
||||
#N canvas 0 0 450 300 randomcolor 0;
|
||||
#X obj 154 102 gemhead;
|
||||
#X obj 154 124 t b b b;
|
||||
#X obj 103 149 random 255;
|
||||
#X obj 103 169 / 255;
|
||||
#X obj 183 147 random 255;
|
||||
#X obj 183 167 / 255;
|
||||
#X obj 257 147 random 255;
|
||||
#X obj 257 167 / 255;
|
||||
#X obj 140 214 pack 0 0 0;
|
||||
#X obj 147 244 outlet;
|
||||
#X connect 0 0 1 0;
|
||||
#X connect 1 0 2 0;
|
||||
#X connect 1 1 4 0;
|
||||
#X connect 1 2 6 0;
|
||||
#X connect 2 0 3 0;
|
||||
#X connect 3 0 8 0;
|
||||
#X connect 4 0 5 0;
|
||||
#X connect 5 0 8 1;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 7 0 8 2;
|
||||
#X connect 8 0 9 0;
|
||||
#X restore 128 133 pd randomcolor;
|
||||
#X msg 128 157 color \$1 \$2 \$3;
|
||||
#X obj 40 435 square 1.9;
|
||||
#X obj 190 435 square 1.9;
|
||||
#X obj 340 435 square 1.9;
|
||||
#X obj 490 435 square 1.9;
|
||||
#X obj 619 214 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144
|
||||
-1 -1 1;
|
||||
#X msg 619 246 simd \$1;
|
||||
#X obj 619 270 t a a;
|
||||
#X obj 667 271 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
|
||||
1;
|
||||
#X connect 1 0 0 0;
|
||||
#X connect 2 0 0 0;
|
||||
#X connect 3 0 4 0;
|
||||
#X connect 4 0 26 0;
|
||||
#X connect 5 0 4 0;
|
||||
#X connect 6 0 1 0;
|
||||
#X connect 6 1 5 0;
|
||||
#X connect 7 0 6 0;
|
||||
#X connect 8 0 11 0;
|
||||
#X connect 9 0 8 0;
|
||||
#X connect 10 0 12 0;
|
||||
#X connect 11 0 10 0;
|
||||
#X connect 12 0 18 0;
|
||||
#X connect 13 0 17 0;
|
||||
#X connect 14 0 13 0;
|
||||
#X connect 15 0 16 0;
|
||||
#X connect 16 0 29 0;
|
||||
#X connect 17 0 15 0;
|
||||
#X connect 18 0 34 0;
|
||||
#X connect 19 0 21 0;
|
||||
#X connect 20 0 19 0;
|
||||
#X connect 21 0 27 0;
|
||||
#X connect 22 0 25 0;
|
||||
#X connect 23 0 22 0;
|
||||
#X connect 24 0 28 0;
|
||||
#X connect 25 0 24 0;
|
||||
#X connect 26 0 20 0;
|
||||
#X connect 26 1 23 0;
|
||||
#X connect 26 2 9 0;
|
||||
#X connect 26 3 14 0;
|
||||
#X connect 27 0 32 0;
|
||||
#X connect 28 0 33 0;
|
||||
#X connect 29 0 35 0;
|
||||
#X connect 30 0 31 0;
|
||||
#X connect 31 0 0 0;
|
||||
#X connect 36 0 37 0;
|
||||
#X connect 37 0 38 0;
|
||||
#X connect 38 0 10 0;
|
||||
#X connect 38 1 15 0;
|
||||
#X connect 39 0 38 0;
|
100
Gem/tests/pix_data/colortest.pd
Normal file
100
Gem/tests/pix_data/colortest.pd
Normal file
|
@ -0,0 +1,100 @@
|
|||
#N canvas 514 139 834 600 10;
|
||||
#X obj 372 415 pix_data;
|
||||
#X obj 14 148 gemwin;
|
||||
#X obj 389 100 gemhead;
|
||||
#X obj 389 281 pix_texture;
|
||||
#X msg 33 120 destroy;
|
||||
#X obj 389 188 pix_image;
|
||||
#X obj 389 305 square 4;
|
||||
#X text 666 236 0.91;
|
||||
#X text 664 296 101;
|
||||
#X text 665 278 111;
|
||||
#X text 576 234 0.91RC;
|
||||
#X text 575 239 _________________;
|
||||
#X text 574 255 100;
|
||||
#X text 574 276 110;
|
||||
#X text 665 260 O11;
|
||||
#X text 574 296 O10;
|
||||
#X obj 442 366 t b f b;
|
||||
#X msg 488 394 0.5;
|
||||
#X obj 442 347 t f;
|
||||
#X msg 13 82 reset \, dimen 300 300 \, lighting 1 \, create \, 1;
|
||||
#X obj 27 29 loadbang;
|
||||
#X obj 29 54 t b b;
|
||||
#X text 184 14 stripes and balls should be of the same color;
|
||||
#X msg 175 144 lighting \$1;
|
||||
#X obj 177 123 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
|
||||
1;
|
||||
#X obj 590 104 world_light;
|
||||
#X obj 595 71 gemhead 1;
|
||||
#X obj 82 318 t a b;
|
||||
#X obj 194 317 i;
|
||||
#X obj 227 318 + 1;
|
||||
#X msg 212 292 0;
|
||||
#X obj 82 221 t a b;
|
||||
#X obj 194 434 t f f;
|
||||
#X obj 82 550 sphere 0.2;
|
||||
#X obj 82 459 separator;
|
||||
#X obj 82 527 color;
|
||||
#X obj 82 503 translateXYZ 0 0 0;
|
||||
#X obj 155 460 * 8;
|
||||
#X obj 155 480 - 4;
|
||||
#X obj 82 252 t a a;
|
||||
#X obj 82 276 t a a;
|
||||
#X obj 82 297 t a a;
|
||||
#X obj 82 192 gemhead 70;
|
||||
#X obj 194 336 / 8;
|
||||
#X obj 199 366 + 0.0625;
|
||||
#X obj 389 249 rotateXYZ;
|
||||
#X floatatom 426 222 5 0 0 0 - - -;
|
||||
#X obj 493 192 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
|
||||
1;
|
||||
#X obj 493 214 * 180;
|
||||
#X msg 405 143 thread 0 \, open ../data/colorstripes.png;
|
||||
#X connect 0 1 35 1;
|
||||
#X connect 2 0 5 0;
|
||||
#X connect 3 0 6 0;
|
||||
#X connect 4 0 1 0;
|
||||
#X connect 5 0 45 0;
|
||||
#X connect 6 0 0 1;
|
||||
#X connect 16 0 0 0;
|
||||
#X connect 16 1 0 2;
|
||||
#X connect 16 2 17 0;
|
||||
#X connect 17 0 0 3;
|
||||
#X connect 18 0 16 0;
|
||||
#X connect 19 0 1 0;
|
||||
#X connect 20 0 21 0;
|
||||
#X connect 21 0 19 0;
|
||||
#X connect 21 1 49 0;
|
||||
#X connect 23 0 1 0;
|
||||
#X connect 24 0 23 0;
|
||||
#X connect 26 0 25 0;
|
||||
#X connect 27 0 34 0;
|
||||
#X connect 27 1 28 0;
|
||||
#X connect 28 0 29 0;
|
||||
#X connect 28 0 43 0;
|
||||
#X connect 29 0 28 1;
|
||||
#X connect 30 0 28 1;
|
||||
#X connect 31 0 39 0;
|
||||
#X connect 31 1 30 0;
|
||||
#X connect 32 0 37 0;
|
||||
#X connect 32 1 18 0;
|
||||
#X connect 34 0 36 0;
|
||||
#X connect 35 0 33 0;
|
||||
#X connect 36 0 35 0;
|
||||
#X connect 37 0 38 0;
|
||||
#X connect 38 0 36 1;
|
||||
#X connect 39 0 40 0;
|
||||
#X connect 39 1 40 0;
|
||||
#X connect 40 0 41 0;
|
||||
#X connect 40 1 41 0;
|
||||
#X connect 41 0 27 0;
|
||||
#X connect 41 1 27 0;
|
||||
#X connect 42 0 31 0;
|
||||
#X connect 43 0 44 0;
|
||||
#X connect 44 0 32 0;
|
||||
#X connect 45 0 3 0;
|
||||
#X connect 46 0 45 3;
|
||||
#X connect 47 0 48 0;
|
||||
#X connect 48 0 46 0;
|
||||
#X connect 49 0 5 0;
|
29
Gem/tests/runcrashtests_gui.pd
Normal file
29
Gem/tests/runcrashtests_gui.pd
Normal file
|
@ -0,0 +1,29 @@
|
|||
#N canvas 687 66 452 551 10;
|
||||
#X obj 177 433 testunit;
|
||||
#X obj 177 183 t b b;
|
||||
#X obj 177 126 bng 40 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
|
||||
-1;
|
||||
#X msg 177 301 bang;
|
||||
#X symbolatom 195 408 0 0 0 0 - - -;
|
||||
#X obj 102 264 t b;
|
||||
#X obj 102 292 del 10;
|
||||
#X obj 177 327 textfile;
|
||||
#X obj 177 346 symbol;
|
||||
#X obj 177 371 t s s;
|
||||
#X symbolatom 213 372 0 0 0 0 - - -;
|
||||
#X msg 202 221 read crashers.txt \, rewind;
|
||||
#X msg 269 383 bang;
|
||||
#X connect 0 0 5 0;
|
||||
#X connect 1 0 3 0;
|
||||
#X connect 1 1 11 0;
|
||||
#X connect 2 0 1 0;
|
||||
#X connect 3 0 7 0;
|
||||
#X connect 4 0 0 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 7 0 8 0;
|
||||
#X connect 8 0 9 0;
|
||||
#X connect 9 0 0 0;
|
||||
#X connect 9 1 10 0;
|
||||
#X connect 11 0 7 0;
|
||||
#X connect 12 0 4 0;
|
45
Gem/tests/runcrashtests_nogui.pd
Normal file
45
Gem/tests/runcrashtests_nogui.pd
Normal file
|
@ -0,0 +1,45 @@
|
|||
#N canvas 338 0 512 588 10;
|
||||
#X obj 86 190 textfile;
|
||||
#X obj 86 34 loadbang;
|
||||
#X msg 137 231 \; pd quit;
|
||||
#X obj 86 317 select 0 1;
|
||||
#X obj 111 343 + 1;
|
||||
#X obj 171 343 + 1;
|
||||
#X obj 87 396 i;
|
||||
#X obj 130 396 i;
|
||||
#X obj 130 465 print regression-test;
|
||||
#X msg 130 440 \$1 tests passed;
|
||||
#X msg 87 419 \$1 tests failed;
|
||||
#X obj 87 375 t b b;
|
||||
#X obj 137 210 t b b;
|
||||
#X obj 86 343 i 1;
|
||||
#X obj 146 343 i 1;
|
||||
#X obj 61 295 t b a;
|
||||
#X obj 86 56 t b b;
|
||||
#X msg 111 144 read crashers.txt \, rewind;
|
||||
#X obj 86 269 testcrashunit;
|
||||
#X connect 0 0 18 0;
|
||||
#X connect 0 1 12 0;
|
||||
#X connect 1 0 16 0;
|
||||
#X connect 3 0 13 0;
|
||||
#X connect 3 1 14 0;
|
||||
#X connect 4 0 13 1;
|
||||
#X connect 5 0 14 1;
|
||||
#X connect 6 0 10 0;
|
||||
#X connect 7 0 9 0;
|
||||
#X connect 9 0 8 0;
|
||||
#X connect 10 0 8 0;
|
||||
#X connect 11 0 6 0;
|
||||
#X connect 11 1 7 0;
|
||||
#X connect 12 0 2 0;
|
||||
#X connect 12 1 11 0;
|
||||
#X connect 13 0 4 0;
|
||||
#X connect 13 0 6 1;
|
||||
#X connect 14 0 5 0;
|
||||
#X connect 14 0 7 1;
|
||||
#X connect 15 0 0 0;
|
||||
#X connect 15 1 3 0;
|
||||
#X connect 16 0 0 0;
|
||||
#X connect 16 1 17 0;
|
||||
#X connect 17 0 0 0;
|
||||
#X connect 18 0 15 0;
|
27
Gem/tests/runtests.pd
Normal file
27
Gem/tests/runtests.pd
Normal file
|
@ -0,0 +1,27 @@
|
|||
#N canvas 687 66 452 551 10;
|
||||
#X obj 177 433 testunit;
|
||||
#X obj 177 183 t b b;
|
||||
#X msg 202 221 read runtests.txt \, rewind;
|
||||
#X obj 177 126 bng 40 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
|
||||
-1;
|
||||
#X msg 177 301 bang;
|
||||
#X symbolatom 195 408 10 0 0 0 - - -;
|
||||
#X obj 102 264 t b;
|
||||
#X obj 102 292 del 10;
|
||||
#X obj 177 327 textfile;
|
||||
#X obj 177 346 symbol;
|
||||
#X obj 177 371 t s s;
|
||||
#X symbolatom 213 372 0 0 0 0 - - -;
|
||||
#X connect 0 0 6 0;
|
||||
#X connect 1 0 4 0;
|
||||
#X connect 1 1 2 0;
|
||||
#X connect 2 0 8 0;
|
||||
#X connect 3 0 1 0;
|
||||
#X connect 4 0 8 0;
|
||||
#X connect 5 0 0 0;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 7 0 8 0;
|
||||
#X connect 8 0 9 0;
|
||||
#X connect 9 0 10 0;
|
||||
#X connect 10 0 0 0;
|
||||
#X connect 10 1 11 0;
|
102
Gem/tests/runtests.sh
Executable file
102
Gem/tests/runtests.sh
Executable file
|
@ -0,0 +1,102 @@
|
|||
#!/bin/bash
|
||||
|
||||
## TODO:
|
||||
## find Gem (either in ../src or ../)
|
||||
## if it is not there, assume it is split into externals
|
||||
|
||||
if [ "x${PD}" = "x" ]
|
||||
then
|
||||
PD=pd
|
||||
fi
|
||||
|
||||
|
||||
#SUFFIX="$$"
|
||||
SUFFIX=$(date +%y%m%d-%H%M%S)
|
||||
|
||||
RUNTESTS_TXT=runtests.txt
|
||||
RUNTESTS_LOG=log-runtests.${SUFFIX}
|
||||
|
||||
LIBFLAGS="-path ../src:../ -lib Gem -path ../abstractions/"
|
||||
|
||||
list_tests() {
|
||||
# find . -mindepth 2 -name "*.pd" | sed 's|\.pd$|;|'
|
||||
ls -1 */*.pd | sed 's|\.pd$|;|'
|
||||
}
|
||||
|
||||
debug() {
|
||||
:
|
||||
if [ "x${DEBUG}" = "xyes" ]; then echo $@; fi
|
||||
}
|
||||
|
||||
|
||||
evaluate_tests() {
|
||||
local logfile
|
||||
local testfile
|
||||
local numtests
|
||||
|
||||
testfile=$1
|
||||
logfile=$2
|
||||
|
||||
debug "now evaluating results in ${logfile} (${testfile}"
|
||||
|
||||
numtests=$(grep -c . ${testfile})
|
||||
numpass=$(egrep -c "regression-test: (.*/fail.*: failed|.*: OK)$" ${logfile})
|
||||
let numfail=0
|
||||
failtests=""
|
||||
for t in $(egrep "regression-test: .*: (failed|OK)$" ${logfile} | egrep -v "regression-test: (.*/fail.*: failed|.*: OK)$" | awk '{print $2}')
|
||||
do
|
||||
failtests="${failtests} ${t%:}"
|
||||
let numfail=numfail+1
|
||||
done
|
||||
debug "number of tests = ${numtests}"
|
||||
echo "regression-test: ======================================" >> ${logfile}
|
||||
echo "regression-test: ${numtests} regression-tests total" >> ${logfile}
|
||||
echo "regression-test: ${numpass} regression-tests passed" >> ${logfile}
|
||||
echo "regression-test: ${numfail} regression-tests failed" >> ${logfile}
|
||||
echo "regression-test: ======================================" >> ${logfile}
|
||||
echo "regression-test: failed tests: ${failtests}" >> ${logfile}
|
||||
debug "show results"
|
||||
cat ${logfile} | egrep "^regression-test: " | sed -e 's/^regression-test: //'
|
||||
}
|
||||
|
||||
|
||||
run_nogui() {
|
||||
debug "running test without gui"
|
||||
${PD} ${LIBFLAGS} -nogui runtests_nogui.pd > ${RUNTESTS_LOG} 2>&1
|
||||
debug "testing done"
|
||||
evaluate_tests ${RUNTESTS_TXT} ${RUNTESTS_LOG}
|
||||
debug "testing finished"
|
||||
}
|
||||
|
||||
run_withgui() {
|
||||
debug "running test with gui"
|
||||
${PD} ${LIBFLAGS} -stderr runtests.pd 2>&1 | tee ${RUNTESTS_LOG}
|
||||
echo "testing completed, no evaluation will be done; see ${RUNTESTS_LOG} for results"
|
||||
}
|
||||
|
||||
list_tests > ${RUNTESTS_TXT}
|
||||
|
||||
USEGUI=""
|
||||
DEBUG=""
|
||||
|
||||
while [ "$@" ]
|
||||
do
|
||||
if test "x$1" = "x-gui"; then
|
||||
USEGUI="yes"
|
||||
fi
|
||||
if test "x$1" = "x-debug"; then
|
||||
DEBUG="yes"
|
||||
fi
|
||||
if test "x$1" = "x-d"; then
|
||||
DEBUG="yes"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "x${USEGUI}" = "xyes" ]; then
|
||||
run_withgui
|
||||
else
|
||||
run_nogui
|
||||
fi
|
||||
|
||||
echo $@
|
49
Gem/tests/runtests_nogui.pd
Normal file
49
Gem/tests/runtests_nogui.pd
Normal file
|
@ -0,0 +1,49 @@
|
|||
#N canvas 338 0 512 588 10;
|
||||
#X obj 86 269 testunit;
|
||||
#X obj 86 190 textfile;
|
||||
#X msg 104 144 read runtests.txt \, rewind;
|
||||
#X obj 86 34 loadbang;
|
||||
#X msg 137 231 \; pd quit;
|
||||
#X obj 86 317 select 0 1;
|
||||
#X obj 111 343 + 1;
|
||||
#X obj 171 343 + 1;
|
||||
#X obj 87 396 i;
|
||||
#X obj 130 396 i;
|
||||
#X obj 130 465 print regression-test;
|
||||
#X msg 130 440 \$1 tests passed;
|
||||
#X msg 87 419 \$1 tests failed;
|
||||
#X obj 87 375 t b b;
|
||||
#X obj 137 210 t b b;
|
||||
#X obj 86 343 i 1;
|
||||
#X obj 146 343 i 1;
|
||||
#X obj 86 56 t b b b;
|
||||
#X msg 123 98 \; pd dsp 1;
|
||||
#X text 182 106 turn on dsp \, just in case an object crashes with
|
||||
dsp enabled...;
|
||||
#X obj 61 295 t b a;
|
||||
#X connect 0 0 20 0;
|
||||
#X connect 1 0 0 0;
|
||||
#X connect 1 1 14 0;
|
||||
#X connect 2 0 1 0;
|
||||
#X connect 3 0 17 0;
|
||||
#X connect 5 0 15 0;
|
||||
#X connect 5 1 16 0;
|
||||
#X connect 6 0 15 1;
|
||||
#X connect 7 0 16 1;
|
||||
#X connect 8 0 12 0;
|
||||
#X connect 9 0 11 0;
|
||||
#X connect 11 0 10 0;
|
||||
#X connect 12 0 10 0;
|
||||
#X connect 13 0 8 0;
|
||||
#X connect 13 1 9 0;
|
||||
#X connect 14 0 4 0;
|
||||
#X connect 14 1 13 0;
|
||||
#X connect 15 0 6 0;
|
||||
#X connect 15 0 8 1;
|
||||
#X connect 16 0 7 0;
|
||||
#X connect 16 0 9 1;
|
||||
#X connect 17 0 1 0;
|
||||
#X connect 17 1 2 0;
|
||||
#X connect 17 2 18 0;
|
||||
#X connect 20 0 1 0;
|
||||
#X connect 20 1 5 0;
|
139
Gem/tests/testcrashunit.pd
Normal file
139
Gem/tests/testcrashunit.pd
Normal file
|
@ -0,0 +1,139 @@
|
|||
#N canvas 577 122 585 499 10;
|
||||
#N canvas 1317 233 474 559 run-test 1;
|
||||
#X obj 71 136 symbol;
|
||||
#X obj 71 104 inlet test-to-run;
|
||||
#X obj 71 514 outlet result;
|
||||
#X obj 71 440 pack 0 s;
|
||||
#X msg 113 136 bang;
|
||||
#N canvas 395 348 450 300 print 0;
|
||||
#X obj 101 247 print regression-test;
|
||||
#X obj 101 204 pack s s;
|
||||
#X obj 101 117 select 1;
|
||||
#X obj 152 137 b;
|
||||
#X msg 152 160 failed;
|
||||
#X msg 101 138 OK;
|
||||
#X obj 101 185 symbol;
|
||||
#X msg 101 223 \$2: \$1;
|
||||
#X obj 101 52 inlet result;
|
||||
#X obj 101 89 unpack 0 s;
|
||||
#X connect 1 0 7 0;
|
||||
#X connect 2 0 5 0;
|
||||
#X connect 2 1 3 0;
|
||||
#X connect 3 0 4 0;
|
||||
#X connect 4 0 6 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 6 0 1 0;
|
||||
#X connect 7 0 0 0;
|
||||
#X connect 8 0 9 0;
|
||||
#X connect 9 0 2 0;
|
||||
#X connect 9 1 1 1;
|
||||
#X restore 96 491 pd print result;
|
||||
#X obj 71 252 t f b;
|
||||
#X obj 71 164 t b s s;
|
||||
#X text 99 217 start regression test;
|
||||
#X text 105 251 regression test finished;
|
||||
#N canvas 226 260 905 641 get 0;
|
||||
#X obj 105 488 outlet;
|
||||
#X obj 105 26 inlet reset;
|
||||
#X obj 105 71 t b b b;
|
||||
#X text 188 123 <- start the test;
|
||||
#X msg 129 45 bang;
|
||||
#X obj 105 430 t b f;
|
||||
#X obj 105 446 del 0;
|
||||
#X obj 105 462 f;
|
||||
#X text 149 450 <--- buffering \, since we have to avoid that the object
|
||||
triggers it's own destruction (stack corruption);
|
||||
#X obj 123 120 s \$0-send;
|
||||
#X obj 162 209 spigot;
|
||||
#X msg 228 209 1;
|
||||
#X msg 258 209 0;
|
||||
#X obj 202 209 t f;
|
||||
#X text 250 148 <- test result;
|
||||
#X obj 162 145 r \$0-receive;
|
||||
#X obj 105 322 spigot;
|
||||
#X obj 228 192 t b b;
|
||||
#X obj 162 240 select -1;
|
||||
#X obj 105 381 t f b;
|
||||
#X msg 162 258 0;
|
||||
#X text 228 242 <- "-1" indicates "wait for result";
|
||||
#X msg 105 296 0;
|
||||
#X text 225 299 <--------------- fail as default;
|
||||
#X connect 1 0 2 0;
|
||||
#X connect 2 0 22 0;
|
||||
#X connect 2 1 9 0;
|
||||
#X connect 4 0 2 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 5 1 7 1;
|
||||
#X connect 6 0 7 0;
|
||||
#X connect 7 0 0 0;
|
||||
#X connect 10 0 18 0;
|
||||
#X connect 11 0 13 0;
|
||||
#X connect 12 0 13 0;
|
||||
#X connect 13 0 10 1;
|
||||
#X connect 13 0 16 1;
|
||||
#X connect 15 0 10 0;
|
||||
#X connect 16 0 19 0;
|
||||
#X connect 17 0 11 0;
|
||||
#X connect 18 0 20 0;
|
||||
#X connect 18 1 19 0;
|
||||
#X connect 19 0 5 0;
|
||||
#X connect 19 1 12 0;
|
||||
#X connect 20 0 16 1;
|
||||
#X connect 22 0 16 0;
|
||||
#X restore 71 232 pd get result;
|
||||
#X text 64 17 the test MUST return a result!;
|
||||
#X text 77 64 cons: the regression test suite will block until the
|
||||
test returns a result (potentially infinitely long)!;
|
||||
#X text 77 33 pros: the test need not be finished in zero-time (good
|
||||
for testing signal-objects or timed objects);
|
||||
#X obj 71 470 t l l;
|
||||
#X obj 71 214 t b;
|
||||
#N canvas 0 0 625 330 create/destroy 0;
|
||||
#X obj 148 53 inlet;
|
||||
#X obj 449 48 inlet clear;
|
||||
#X obj 148 129 pack s \$0;
|
||||
#X msg 173 196 clear;
|
||||
#X obj 449 76 t b;
|
||||
#X obj 148 148 t l b;
|
||||
#X obj 148 228 s pd-\$0-regressiontest;
|
||||
#X obj 148 94 t s;
|
||||
#X msg 148 165 obj 100 100 \$1 \$2-bang;
|
||||
#X connect 0 0 7 0;
|
||||
#X connect 1 0 4 0;
|
||||
#X connect 2 0 5 0;
|
||||
#X connect 3 0 6 0;
|
||||
#X connect 4 0 3 0;
|
||||
#X connect 5 0 8 0;
|
||||
#X connect 5 1 3 0;
|
||||
#X connect 7 0 2 0;
|
||||
#X connect 8 0 6 0;
|
||||
#X restore 89 326 pd create/destroy testpatch;
|
||||
#X connect 0 0 7 0;
|
||||
#X connect 1 0 0 0;
|
||||
#X connect 3 0 14 0;
|
||||
#X connect 4 0 0 0;
|
||||
#X connect 6 0 3 0;
|
||||
#X connect 6 1 16 1;
|
||||
#X connect 7 0 15 0;
|
||||
#X connect 7 1 16 0;
|
||||
#X connect 7 2 3 1;
|
||||
#X connect 10 0 6 0;
|
||||
#X connect 14 0 2 0;
|
||||
#X connect 14 1 5 0;
|
||||
#X connect 15 0 10 0;
|
||||
#X restore 94 218 pd run-test;
|
||||
#X obj 94 243 outlet;
|
||||
#X obj 94 191 inlet;
|
||||
#N canvas 487 407 450 300 \$0-regressiontest 0;
|
||||
#X restore 92 266 pd \$0-regressiontest;
|
||||
#X text 64 17 the test MUST IMMEDIATELY return a result!;
|
||||
#X text 87 39 1: OK (test passed);
|
||||
#X text 87 52 0: KO (test failed);
|
||||
#X text 81 68 -1:;
|
||||
#X text 103 68 WAIT (test takes some time);
|
||||
#X text 63 131 note: we could have this be using "0" as the WAIT result
|
||||
\, an no-result as KO \; for legacy reasons we don't;
|
||||
#X text 64 92 if no result is returned immediately \, the test is considered
|
||||
to be FAILED;
|
||||
#X connect 0 0 1 0;
|
||||
#X connect 2 0 0 0;
|
140
Gem/tests/testunit.pd
Normal file
140
Gem/tests/testunit.pd
Normal file
|
@ -0,0 +1,140 @@
|
|||
#N canvas 577 122 585 499 10;
|
||||
#N canvas 455 165 474 559 run-test 0;
|
||||
#X obj 71 136 symbol;
|
||||
#X obj 71 104 inlet test-to-run;
|
||||
#X obj 71 514 outlet result;
|
||||
#X obj 71 440 pack 0 s;
|
||||
#X msg 113 136 bang;
|
||||
#N canvas 395 348 450 300 print 0;
|
||||
#X obj 101 247 print regression-test;
|
||||
#X obj 101 204 pack s s;
|
||||
#X obj 101 117 select 1;
|
||||
#X obj 152 137 b;
|
||||
#X msg 152 160 failed;
|
||||
#X msg 101 138 OK;
|
||||
#X obj 101 185 symbol;
|
||||
#X msg 101 223 \$2: \$1;
|
||||
#X obj 101 52 inlet result;
|
||||
#X obj 101 89 unpack 0 s;
|
||||
#X connect 1 0 7 0;
|
||||
#X connect 2 0 5 0;
|
||||
#X connect 2 1 3 0;
|
||||
#X connect 3 0 4 0;
|
||||
#X connect 4 0 6 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 6 0 1 0;
|
||||
#X connect 7 0 0 0;
|
||||
#X connect 8 0 9 0;
|
||||
#X connect 9 0 2 0;
|
||||
#X connect 9 1 1 1;
|
||||
#X restore 96 491 pd print result;
|
||||
#X obj 71 252 t f b;
|
||||
#X obj 71 164 t b s s;
|
||||
#X text 99 217 start regression test;
|
||||
#X text 105 251 regression test finished;
|
||||
#N canvas 318 184 905 641 get 0;
|
||||
#X obj 105 488 outlet;
|
||||
#X obj 105 26 inlet reset;
|
||||
#X obj 105 71 t b b b;
|
||||
#X obj 162 229 spigot;
|
||||
#X msg 228 229 1;
|
||||
#X msg 258 229 0;
|
||||
#X obj 202 229 t f;
|
||||
#X obj 163 120 s \$0-send;
|
||||
#X text 248 120 <- start the test;
|
||||
#X text 250 168 <- test result;
|
||||
#X obj 162 165 r \$0-receive;
|
||||
#X obj 105 342 spigot;
|
||||
#X obj 228 212 t b b;
|
||||
#X msg 129 45 bang;
|
||||
#X obj 162 260 select -1;
|
||||
#X obj 105 401 t f b;
|
||||
#X msg 162 278 0;
|
||||
#X msg 105 316 0;
|
||||
#X text 136 321 <--------------- fail as default;
|
||||
#X text 228 262 <- "-1" indicates "wait for result";
|
||||
#X obj 105 430 t b f;
|
||||
#X obj 105 446 del 0;
|
||||
#X obj 105 462 f;
|
||||
#X text 149 450 <--- buffering \, since we have to avoid that the object
|
||||
triggers it's own destruction (stack corruption);
|
||||
#X connect 1 0 2 0;
|
||||
#X connect 2 0 17 0;
|
||||
#X connect 2 1 7 0;
|
||||
#X connect 2 2 12 0;
|
||||
#X connect 3 0 14 0;
|
||||
#X connect 4 0 6 0;
|
||||
#X connect 5 0 6 0;
|
||||
#X connect 6 0 3 1;
|
||||
#X connect 6 0 11 1;
|
||||
#X connect 10 0 3 0;
|
||||
#X connect 11 0 15 0;
|
||||
#X connect 12 0 4 0;
|
||||
#X connect 13 0 2 0;
|
||||
#X connect 14 0 16 0;
|
||||
#X connect 14 1 15 0;
|
||||
#X connect 15 0 20 0;
|
||||
#X connect 15 1 5 0;
|
||||
#X connect 16 0 11 1;
|
||||
#X connect 17 0 11 0;
|
||||
#X connect 20 0 21 0;
|
||||
#X connect 20 1 22 1;
|
||||
#X connect 21 0 22 0;
|
||||
#X connect 22 0 0 0;
|
||||
#X restore 71 232 pd get result;
|
||||
#X text 64 17 the test MUST return a result!;
|
||||
#X text 77 64 cons: the regression test suite will block until the
|
||||
test returns a result (potentially infinitely long)!;
|
||||
#X text 77 33 pros: the test need not be finished in zero-time (good
|
||||
for testing signal-objects or timed objects);
|
||||
#X obj 71 470 t l l;
|
||||
#X obj 71 214 t b;
|
||||
#N canvas 0 0 625 330 create/destroy 0;
|
||||
#X obj 148 53 inlet;
|
||||
#X obj 449 48 inlet clear;
|
||||
#X obj 148 129 pack s \$0;
|
||||
#X msg 173 196 clear;
|
||||
#X obj 449 76 t b;
|
||||
#X obj 148 148 t l b;
|
||||
#X obj 148 228 s pd-\$0-regressiontest;
|
||||
#X obj 148 94 t s;
|
||||
#X msg 148 165 obj 100 100 \$1 \$2;
|
||||
#X connect 0 0 7 0;
|
||||
#X connect 1 0 4 0;
|
||||
#X connect 2 0 5 0;
|
||||
#X connect 3 0 6 0;
|
||||
#X connect 4 0 3 0;
|
||||
#X connect 5 0 8 0;
|
||||
#X connect 5 1 3 0;
|
||||
#X connect 7 0 2 0;
|
||||
#X connect 8 0 6 0;
|
||||
#X restore 89 326 pd create/destroy testpatch;
|
||||
#X connect 0 0 7 0;
|
||||
#X connect 1 0 0 0;
|
||||
#X connect 3 0 14 0;
|
||||
#X connect 4 0 0 0;
|
||||
#X connect 6 0 3 0;
|
||||
#X connect 6 1 16 1;
|
||||
#X connect 7 0 15 0;
|
||||
#X connect 7 1 16 0;
|
||||
#X connect 7 2 3 1;
|
||||
#X connect 10 0 6 0;
|
||||
#X connect 14 0 2 0;
|
||||
#X connect 14 1 5 0;
|
||||
#X connect 15 0 10 0;
|
||||
#X restore 94 218 pd run-test;
|
||||
#X obj 94 243 outlet;
|
||||
#X obj 94 191 inlet;
|
||||
#N canvas 487 407 450 300 \$0-regressiontest 0;
|
||||
#X restore 92 266 pd \$0-regressiontest;
|
||||
#X text 64 17 the test MUST IMMEDIATELY return a result!;
|
||||
#X text 87 39 1: OK (test passed);
|
||||
#X text 87 52 0: KO (test failed);
|
||||
#X text 81 68 -1:;
|
||||
#X text 103 68 WAIT (test takes some time);
|
||||
#X text 64 92 if no result is returned immediately \, the test is considered
|
||||
to be FAILED!;
|
||||
#X text 63 131 note: we could have this be using "0" as the WAIT result
|
||||
\, an no-result as KO \; for legacy reasons we don't;
|
||||
#X connect 0 0 1 0;
|
||||
#X connect 2 0 0 0;
|
Loading…
Add table
Add a link
Reference in a new issue