1
regression test framework
2
=========================
4
this is a simple framework for regression tests for pd-objects
8
each test is a patch with one (1) inlet and one (1) outlet.
9
a bang is sent to the inlet to start the test.
10
the test has to send "1" to the outlet if the test succeeded.
11
any other result will be considered a failure of the test.
12
the test MUST return a result, else it will halt the entire
13
testrun. (this is needed to allow objects that do not return
14
in zero-time (signal-objects or other timed objects) to be
15
tested with this framework too)
17
example tests of [==]:
28
BAD test (will hang forever):
42
HOW THE FRAMEWORK WORKS
43
-----------------------
44
all .pd-files in one-level-subdirectories are considered tests.
45
e.g. ./subdir/patch1.pd is tested, while ./patch2.pd and
46
./sub/dir/patch3.pd are not taken into account
47
this is important if you need abstractions for your test
49
at the beginning of the testrun a file "runtests.txt" is generated
50
which contains all test-patches, one per line and each line
51
terminated by semicolon.
52
then pd is started and "runtests.txt" is read (via [textfile]).
53
for each line in the file, an object is created, a bang is
54
sent to the object and the result is received and compared with "1".
55
a result-message is printed.
56
when all the tests have been run, a summary of how many tests have
57
been run (and how many tests have been run successfully), and pd quits.
58
printout is first done into a logfile "runtests.log".
59
this logfile is printed to the stdout after pd quit.
64
pd-0.40 has problems creating an path-prefixed abstraction when a
65
library of the same name is already loaded.
66
e.g. if the library "zexy" is loaded, then the abstraction ./path/zexy.pd
67
CANNOT be instantiated as object [./path/zexy];
68
this seems to be fixed in newer versions of pd