1
#N canvas 577 122 585 499 10;
2
#N canvas 455 165 474 559 run-test 0;
4
#X obj 71 104 inlet test-to-run;
5
#X obj 71 514 outlet result;
6
#X obj 71 440 pack 0 s;
8
#N canvas 395 348 450 300 print 0;
9
#X obj 101 247 print regression-test;
10
#X obj 101 204 pack s s;
11
#X obj 101 117 select 1;
13
#X msg 152 160 failed;
15
#X obj 101 185 symbol;
16
#X msg 101 223 \$2: \$1;
17
#X obj 101 52 inlet result;
18
#X obj 101 89 unpack 0 s;
30
#X restore 96 491 pd print result;
32
#X obj 71 164 t b s s;
33
#X text 99 217 start regression test;
34
#X text 105 251 regression test finished;
35
#N canvas 318 184 905 641 get 0;
36
#X obj 105 488 outlet;
37
#X obj 105 26 inlet reset;
38
#X obj 105 71 t b b b;
39
#X obj 162 229 spigot;
43
#X obj 163 120 s \$0-send;
44
#X text 248 120 <- start the test;
45
#X text 250 168 <- test result;
46
#X obj 162 165 r \$0-receive;
47
#X obj 105 342 spigot;
50
#X obj 162 260 select -1;
54
#X text 136 321 <--------------- fail as default;
55
#X text 228 262 <- "-1" indicates "wait for result";
59
#X text 149 450 <--- buffering \, since we have to avoid that the object
60
triggers it's own destruction (stack corruption);
84
#X restore 71 232 pd get result;
85
#X text 64 17 the test MUST return a result!;
86
#X text 77 64 cons: the regression test suite will block until the
87
test returns a result (potentially infinitely long)!;
88
#X text 77 33 pros: the test need not be finished in zero-time (good
89
for testing signal-objects or timed objects);
91
#N canvas 0 0 625 330 create/destroy 0;
93
#X obj 449 48 inlet clear;
94
#X obj 148 129 pack s \$0;
98
#X msg 148 165 obj 100 100 r \$2-send \, obj 100 150 \$1 \, obj 100
99
200 s \$2-receive \, connect 0 0 1 0 \, connect 1 0 2 0;
100
#X obj 148 228 s pd-\$0-regressiontest;
111
#X restore 146 324 pd create/destroy testpatch;
112
#N canvas 0 0 450 300 restartaudio 0;
115
#X msg 113 121 dsp 0 \, dsp 1;
120
#X restore 141 186 pd restartaudio;
135
#X connect 17 0 10 0;
136
#X connect 18 0 17 0;
137
#X connect 18 1 16 0;
138
#X restore 94 218 pd run-test;
139
#X obj 94 243 outlet;
141
#N canvas 487 407 450 300 \$0-regressiontest 0;
142
#X restore 92 266 pd \$0-regressiontest;
143
#X text 64 17 the test MUST IMMEDIATELY return a result!;
144
#X text 87 39 1: OK (test passed);
145
#X text 87 52 0: KO (test failed);
147
#X text 103 68 WAIT (test takes some time);
148
#X text 64 92 if no result is returned immediately \, the test is considered
150
#X text 63 131 note: we could have this be using "0" as the WAIT result
151
\, an no-result as KO \; for legacy reasons we don't;