4 There is no test-suite for testing
6 I have written a lot of small files that each test one
7 particular property of the program.
8 At this moment there are about 220 test programs.
10 It would take a lot of time and effort to run these tests by hand.
11 To ease this work I wrote a program that runs these tests
13 The test program (the program that runs the tests) needs, associated
14 with each .c file, a .w file, containing from each expected warning
15 a substring. E.g. when the following warnings should be given by
19 file t.c, line 3, i evaluation order undefined
20 file t.c, line 6, a set but not used in function main
23 it is sufficient to write a file \f(CWt.w\fP containing
26 a set but not used in function main
27 i evaluation order undefined
30 The test program is called with all the .c files to be tested
33 Sometimes it is necessary to test
38 on two files when two consecutive
39 arguments are of the form \fIname\fPa.c and \fIname\fPb.c.
40 It then compares the output of
42 with the file \fIname\fP.w.
45 is also tested by running it on existing programs.
47 has been run on some \s-2UNIX\s+2 utility programs in
48 /usr/src/cmd, on Unipress Emacs (consisting of more than 30,000
49 lines of code) and the program itself.
50 Bugs have been found in e.g. /usr/src/cmd/cat.c and
52 To test the robustness of the program, it was run on the
53 password file /etc/passwd and on `mixed' C program files.
54 These mixed C program files are C program files that were
55 broken in chunks and then put together in a different order.