aboutsummaryrefslogtreecommitdiff
path: root/tests/testunit.pd
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testunit.pd')
-rw-r--r--tests/testunit.pd131
1 files changed, 85 insertions, 46 deletions
diff --git a/tests/testunit.pd b/tests/testunit.pd
index b5823fa..1662d43 100644
--- a/tests/testunit.pd
+++ b/tests/testunit.pd
@@ -1,21 +1,17 @@
-#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;
+#N canvas 302 200 312 252 10;
+#N canvas 47 151 894 418 run-test 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
+#X obj 506 344 outlet result;
+#X obj 506 320 pack 0 s;
+#X obj 150 155 makefilename pd-%d-regressiontest;
+#X obj 89 195 pack s \$0 s;
+#X obj 150 136 f \$0;
+#X obj 89 130 t s b;
+#X obj 506 140 t b s s;
+#X msg 113 76 bang;
+#X obj 71 314 s \$0-send;
+#X msg 89 215 \; \$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;
@@ -39,40 +35,83 @@
#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 restore 531 291 pd print result;
+#X obj 506 270 t f f;
+#X msg 531 235 \; \$1 clear;
+#X obj 531 215 symbol;
+#X obj 506 182 t f b;
+#X obj 71 104 t b s s;
+#X text 63 387 start regression test;
+#X text 501 391 regression test finished;
+#N canvas 0 0 450 475 get 0;
+#X obj 106 36 r \$0-receive;
+#X msg 137 280 0;
+#X obj 106 159 del 0;
+#X obj 106 310 f;
+#X text 193 34 get the result;
+#X text 145 155 we need a delay \, since the object's output triggers
+the destruction of the object \; this would lead to stack corruption
+if we do it immediately;
+#X obj 131 358 outlet;
+#X obj 137 236 inlet reset;
+#X obj 106 336 t b f;
+#X obj 106 95 spigot;
+#X obj 137 258 t b b;
+#X msg 161 74 1;
+#X obj 106 117 t b f b;
+#X msg 189 74 0;
+#X obj 137 74 t f;
+#X text 182 98 we only accept the 1st result of the test;
+#X connect 0 0 9 0;
+#X connect 1 0 3 1;
+#X connect 2 0 3 0;
+#X connect 3 0 8 0;
+#X connect 7 0 10 0;
+#X connect 8 0 11 0;
+#X connect 8 1 6 0;
+#X connect 9 0 12 0;
+#X connect 10 0 1 0;
+#X connect 10 1 11 0;
+#X connect 11 0 14 0;
+#X connect 12 0 2 0;
+#X connect 12 1 3 1;
+#X connect 12 2 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 9 1;
+#X restore 506 162 pd get result;
+#X obj 150 175 t s s;
+#X text 401 23 the test MUST return a result!;
+#X text 414 70 cons: the regression test suite will block until the
+test returns a result (potentially infinitely long)!;
+#X text 414 39 pros: the test need not be finished in zero-time (good
+for testing signal-objects or timed objects);
+#X connect 0 0 17 0;
+#X connect 1 0 0 0;
+#X connect 3 0 2 0;
+#X connect 4 0 21 0;
+#X connect 5 0 11 0;
+#X connect 6 0 4 0;
+#X connect 7 0 5 0;
+#X connect 7 1 6 0;
+#X connect 8 0 20 0;
+#X connect 8 1 3 1;
+#X connect 8 2 12 1;
+#X connect 9 0 0 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 connect 13 1 12 0;
+#X connect 15 0 14 0;
+#X connect 16 0 13 0;
+#X connect 16 1 15 0;
+#X connect 17 0 10 0;
+#X connect 17 1 7 0;
+#X connect 17 2 8 0;
+#X connect 20 0 16 0;
+#X connect 21 0 5 2;
+#X connect 21 1 15 1;
#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;
+#N canvas 487 407 450 300 1002-regressiontest 0;
#X restore 92 186 pd \$0-regressiontest;
#X connect 0 0 1 0;
#X connect 2 0 0 0;