PROOF(1)
NAME
proof
SYNOPSIS
proof [ switches ] linker_command_line
DESCRIPTION
The purpose of TestCenter is to help you find and fix run-time errors and memory leaks, and to test code coverage in any executable program. The proof command adds to your executable program the information required by TestCenter. When you "proof" your executable, TestCenter creates a new executable that it can use to provide results about errors, leaks, and/or coverage; it does not change the object files from which the executable is built.
SWITCHES
Use one or more of the following switches, depending on the aspect of TestCenter that you want to use.
-errorsrun-time error checking
-leaksleak detection
-coveragefor code coverage analysis
If you omit all three of these switches, you get all three features.
USAGE
Put the proof command just before the linker command that creates the final executable version of your application.
NOTE:To generate code coverage information with TestCenter, you must have created your object files using the -g switch. Also, by default, TestCenter does not find errors in shared libraries such as the C library. To enable error detection for such libraries, link with the static library versions instead of the shared version.
Typically you use the proof command by putting it as the first word in the line in your Makefile that links and creates the final executable. This line most likely begins with cc or CC.
If you use the make command to create your executable, you can typically copy and paste an existing target in your Makefile, and modify it as follows to create a TestCenter target:
1 Create a new target name, probably containing a prefix or suffix
indicating that it’s a TestCenter executable
2 Add the proof command to the linker line
3 Change the name of the output file to correspond to the new
target name
EXAMPLE
If the following is a target in your Makefile:
my_program:$(OBJS)
CC −o my_program ($FLAGS) $ (OBJS) $(LIBS)
Add a target such as the following:
my_program.tc:$(OBJS)
proof CC −o my_program.tc ($FLAGS) $(OBJS) $(LIBS)
Create a proofed executable by typing the following at the shell:
$ make my_program.tc
Now, whenever you run my_program.tc, the executable automatically invokes the GUI version of TestCenter. Thus, in this example, you could start up TestCenter by typing the following at the shell prompt:
$ my_program.tc
You can also start up TestCenter with the testcenter command, with a proofed executable filename:
$ testcenter tc_my_program
SEE ALSO
testcenter.1
tcreport.1
tctutor.1
SunOS 1.0.2 &beta1.0 — Last change: 1 July 1993