Update of /cvsroot/pure-data/externals/iem/iemmatrix/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21472
Added Files:
runtests.pd runtests.sh runtests.txt runtests_nogui.pd
testunit.pd
Log Message:
added (simple) regression tests for objects; currrently the only test performed is whether an object reacts on a message
--- NEW FILE: runtests.txt ---
mtx_abs/exist;
mtx_add/exist1;
mtx_add/exist;
mtx_and/exist;
mtx_bitand/exist;
mtx_bitleft/exist;
mtx_bitor/exist;
mtx_bitright/exist;
mtx_check/exist;
mtx_cholesky/exist;
mtx_col/exist;
mtx_colon/exist1;
mtx_colon/exist;
mtx_concat/exist;
mtx_conv/exist;
mtx_cos/exist;
mtx_cumsum/exist;
mtx_dbtorms/exist;
mtx_decay/exist;
mtx_diag/exist;
mtx_diegg/exist;
mtx_diff/exist;
mtx_distance2/exist;
mtx_egg/exist;
mtx_element/exist;
mtx_eq/exist;
mtx_exp/exist;
mtx_eye/exist;
mtx_fill/exist;
mtx_find/exist;
mtx_gauss/exist;
mtx_ge/exist;
mtx_gt/exist;
mtx_index/exist;
mtx_int/exist;
mtx_inverse/exist;
mtx_le/exist;
mtx_log/exist;
mtx_lt/exist;
mtx_matrix/exist_matrix;
mtx_matrix/exist_mtx;
mtx_max2/exist;
mtx_mean/exist;
mtx_min2/exist;
mtx_mul/exist1;
mtx_mul/exist2;
mtx_mul/exist;
mtx_neq/exist;
mtx_not/exist1;
mtx_not/exist;
mtx_ones/exist;
mtx_or/exist;
mtx_pivot/exist;
mtx_prod/exist;
mtx_rand/exist;
mtx_repmat/exist;
mtx_resize/exist;
mtx_reverse/exist;
mtx_rmstodb/exist;
mtx_roll/exist;
mtx_row/exist;
mtx_rowrfft/exist;
mtx_rowrifft/exist;
mtx_scroll/exist;
mtx_sin/exist;
mtx_size/exist;
mtx_slice/exist;
mtx_sort/exist;
mtx_sub/exist1;
mtx_sub/exist;
mtx_sum/exist;
mtx_trace/exist;
mtx_transpose/exist;
mtx_zeros/exist;
--- NEW FILE: runtests.pd ---
#N canvas 367 200 813 499 10;
#X obj 177 433 testunit;
#X obj 177 377 textfile;
#X obj 177 183 t b b;
#X msg 207 261 read runtests.txt \, rewind;
#X obj 177 287 metro 10;
#X msg 243 289 0;
#X obj 177 126 bng 40 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 177 351 bang;
#X symbolatom 195 408 10 0 0 0 - - -;
#X obj 485 341 mtx_col/exist;
#X connect 1 0 0 0;
#X connect 1 1 5 0;
#X connect 2 0 4 0;
#X connect 2 1 3 0;
#X connect 3 0 1 0;
#X connect 4 0 7 0;
#X connect 5 0 4 0;
#X connect 6 0 2 0;
#X connect 7 0 1 0;
#X connect 8 0 0 0;
--- NEW FILE: testunit.pd ---
#N canvas 695 274 312 252 10;
#N canvas 0 0 564 876 run-test 0;
#X obj 87 512 r \$0-receive;
#X obj 71 532 f;
#X msg 96 533 0;
#X obj 71 76 symbol;
#X obj 71 44 inlet test-to-run;
#X obj 71 639 outlet result;
#X obj 71 615 pack 0 s;
#X obj 181 205 makefilename pd-%d-regressiontest;
#X obj 109 226 pack s \$0 s;
#X obj 181 186 f \$0;
#X obj 109 160 t s b;
#X obj 143 489 t b s s;
#X obj 71 104 t b b s s;
#X msg 140 72 bang;
#X obj 90 135 s \$0-send;
#X msg 109 246 \; \$3 clear \; \$3 obj 100 100 r \$2-send \; \$3 obj
100 150 \$1 \; \$3 obj 100 200 s \$2-receive \; \$3 connect 0 0 1 0
\; \$3 connect 1 0 2 0;
#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 296 82 inlet test;
#X obj 101 92 inlet result;
#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 1 1;
#X connect 9 0 2 0;
#X restore 101 584 pd print result;
#X obj 71 565 t f f;
#X msg 101 406 \; \$1 clear;
#X obj 101 386 symbol;
#X obj 71 364 t b b;
#X connect 0 0 1 1;
#X connect 1 0 17 0;
#X connect 2 0 1 1;
#X connect 3 0 12 0;
#X connect 4 0 3 0;
#X connect 6 0 5 0;
#X connect 7 0 8 2;
#X connect 7 0 19 1;
#X connect 8 0 15 0;
#X connect 9 0 7 0;
#X connect 10 0 8 0;
#X connect 10 1 9 0;
#X connect 11 0 2 0;
#X connect 11 1 6 1;
#X connect 11 2 16 1;
#X connect 12 0 20 0;
#X connect 12 1 14 0;
#X connect 12 2 10 0;
#X connect 12 3 11 0;
#X connect 13 0 3 0;
#X connect 17 0 6 0;
#X connect 17 1 16 0;
#X connect 19 0 18 0;
#X connect 20 0 1 0;
#X connect 20 1 19 0;
#X restore 94 138 pd run-test;
#X obj 94 163 outlet;
#X obj 94 111 inlet;
#N canvas 487 407 450 300 1005-regressiontest 0;
#X restore 92 186 pd \$0-regressiontest;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
--- NEW FILE: runtests_nogui.pd ---
#N canvas 367 200 321 256 10;
#X obj 86 199 testunit;
#X obj 86 130 textfile;
#X obj 86 56 t b b;
#X msg 116 84 read runtests.txt \, rewind;
#X obj 86 34 loadbang;
#X msg 137 156 \; pd quit;
#X obj 86 110 until;
#X connect 1 0 0 0;
#X connect 1 1 5 0;
#X connect 2 0 6 0;
#X connect 2 1 3 0;
#X connect 3 0 1 0;
#X connect 4 0 2 0;
#X connect 6 0 1 0;
--- NEW FILE: runtests.sh ---
#!/bin/sh
ls -1 */*.pd | sed 's/\.pd/;/' > runtests.txt
function run_nogui() {
pd -lib ../iemmatrix -nogui runtests_nogui.pd > runtests.log.$$ 2>&1
cat runtests.log.$$ | egrep "^regression-test: " | sed -e 's/^regression-test: //'
}
function run_withgui() {
pd -lib ../iemmatrix runtests.pd > runtests.log 2>&1
}
if test "x$1" = "x-gui"; then
run_withgui
else
run_nogui
fi