.\"------------------------------------------------------------------------- .\" CxxTest: A lightweight C++ unit testing library. .\" Copyright (c) 2008 Sandia Corporation. .\" This software is distributed under the LGPL License v2.1 .\" For more information, see the COPYING file in the top CxxTest directory. .\" Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, .\" the U.S. Government retains certain rights in this software. .\"------------------------------------------------------------------------- .\" .\" This is cxxtestgen.1 file, part of CxxTest .\" Copyright (C) 2012 Simone Rossetto .\" GNU Lesser General Public License v2.1 .\" .\" process with groff -man -Tascii cxxtestgen.1 .\" or with groff -t -e -mandoc -Tps cxxtestgen.1 > cxxtestgen.ps .\" or with nroff -man cxxtestgen.1 | less .TH CXXTESTGEN 1 "2012-01-06" "CxxTest generator version 4" "User Manual" .SH NAME cxxtestgen \- Generates test source files for CxxTest .SH SYNOPSIS .B cxxtestgen [\fIoptions\fR] [\-o \fIoutput\fR] \fI \fR... .SH DESCRIPTION This script parses the \fIfile\fRs provided and generates an \fIoutput\fR source file that can be build with traditional compiler to produce the test-runner executable. .SH OPTIONS .TP .B \-h .TQ .B \-\-help Show help message and exit. .TP .B \-\-version Write the CxxTest version. .TP .BI \-o\ NAME .TQ .BI \-\-output= NAME Write output to file \fINAME\fR. .TP .BI \-w\ WORLD .TQ .BI \-\-world= WORLD The label of the tests, used to name the XML results. .TP .BI \-\-include= HEADER Include file \fIHEADER\fR in the test runner before other headers. .TP .B \-\-abort\-on\-fail Abort tests on failed asserts (like xUnit). .TP .BI \-\-main= MAIN Specify an alternative name for the main() function. .TP .BI \-\-headers= FILENAME Specify a filename that contains a list of header files that are processed to generate a test runner. .TP .BI \-\-runner= CLASS Create a test runner that processes test events using the class CxxTest::\fICLASS\fR. .P .RS The currently available runners are: .IP \- 3 .B ErrorPrinter This is the standard error printer, which formats its output to the standard output stream (std::cout). Same as \fB\-\-error\-printer\fR. .IP \- 3 .B ParenPrinter Identical to \fBErrorPrinter\fR except that it prints line numbers in parantheses. This is the way Visual Studio expects it. .IP \- 3 .B StdioPrinter The same as \fBErrorPrinter\fR except that it uses printf instead of std::cout. .IP \- 3 .B XmlPrinter Print test results to an XML file. .IP \- 3 .B XUnitPrinter This test listener generates output using both \fBErrorPrinter\fR and \fBXmlPrinter\fR. Same as \fB\-\-xunit\-printer\fR. .RE .TP .BI \-\-gui= CLASS Create a GUI test runner that processes test events using the class CxxTest::\fICLASS\fR. (deprecated) .TP .B \-\-error\-printer Create a test runner using the \fBErrorPrinter\fR class, and allow the use of the standard library. .TP .B \-\-xunit\-printer Create a test runner using the \fBXUnitPrinter\fR class. .TP .BI \-\-xunit\-file= XUNIT\-FILE The file to which the XML summary is written for test runners using the \fBXUnitPrinter\fR class. The default XML filename is TEST\-<\fIWORLD\fR>.xml, where <\fIWORLD\fR> is the value of the \fB\-\-world\fR option. (default: cxxtest) .TP .B \-\-have\-std Use the standard library (even if not found in tests). .TP .B \-\-no\-std Do not use standard library (even if found in tests). .TP .B \-\-have\-eh Use exception handling (even if not found in tests). .TP .B \-\-no\-eh Do not use exception handling (even if found in tests). .TP .BI \-\-longlong= TYPE Use \fITYPE\fR as for long long integers. The default is for 'no' long long integer type to be specified, which is consistent with the current C++ standard. .TP .B \-\-no\-static\-init Do not rely on static initialization in the test runner. .TP .BI \-\-template= TEMPLATE Generate the test runner using file \fITEMPLATE\fR to define a template. .TP .B \-\-root Write the main() function and global data for a test runner. .TP .BI \-\-part Write the tester classes for a test runner. .TP .B \-f .TQ .B \-\-fog\-parser Use new FOG C++ parser (Python 2.7 is required). .SH COPYRIGHT Copyright (C) 2008 Sandia Corporation This software is distributed under the LGPL License v2.1 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.