In this section:
When you build with Insure++, the tool performs source code Instrumentation. Insure++ rewrites, or “instruments,” the code in a process that also performs mutation testing. Insure++ then compiles and links the instrumented code with your native compiler.
Source code instrumentation has several advantages over object code instrumentation, including a deeper understanding of the code being checked. This results in more complicated and subtle bugs being detected.
In addition to uncovering such problems as memory leaks and pointer errors, Insure++ uncovers code ambiguities. As a result, many more bugs are found, including language–specific and algorithmic errors. Insure++ is also able to report code coverage data with TCA. For more information on TCA, refer to the section Analyzing Coverage with TCA.
The basic procedure for building code with Insure++ is detailed in the following steps.
Click the Insure++ Build Solution icon on the toolbar to instrument and compile all projects in the current solution. To clean and rebuild the current solution in the IDE, click the Insure++ Rebuild Solution icon. |
To stop Insure++ while in progress, click the Insure++ Stop Build icon. To view and/or change Insure++ options, click the Insure++ Control Panel icon.
By default, error messages are sent to Insra. Errors may be reported at both compile-time and runtime. For more information on using Insra, see Working with Results in Insra. For details on reported problems, see Error Codes.
Insure++ generally hides standard compiler warnings to prevent confusion.
Set the build macro to insure
(instead of cl
) and set the link macro to inslink
.
If you use devenv
to build a project from the command line, you can also use the insdevenv
option to build source code with Insure++. The syntax for both options is the same.
In order for insdevenv to work properly, the directory in which devenv resides must be specified in the PATH environment variable. |
devenv solutionfile.sln /build solutionconfig [ /project projectnameorfile [ /projectconfig name ] ] |
insdevenv solutionfile.sln /build solutionconfig [ /project projectnameorfile [/projectconfig name ] ] |