Entry point macros control the testing entry point. By default, main() is called. However, sometimes the tests can only be called from a different point in the program you are testing, or need to be called in a special manner. You can control this using the following macros:
|CPPTEST_EPT_main||If defined, the 'int main(int, char*)' is used as an entry point.|
|CPPTEST_EPT_wmain||If defined, the 'int wmain(int, wchar_t*)' is used as an entry point.|
|CPPTEST_EPT_WinMain||If defined, the 'int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPSTR, int)' is used as an entry point.|
|CPPTEST_EPT_WinMain||If defined, the 'int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)' is used as an entry point.|
|CPPTEST_EPT_void_main||If defined, the 'void main(int, char*)' is used as an entry point.|
|CPPTEST_EPT_main_no_args||If defined, the 'int main(void)' is used as an entry point.|
|CPPTEST_EPT_void_main_no_args||If defined, the 'void main(void)' is used as an entry point.|
|CPPTEST_ENTRY_POINT_C_LINKAGE||If defined, the main function declaration starts with 'extern "C"' if compiled as c++ code.|
You can also define the CPPTEST_ENTRY_POINT macro. If this macro will be defined, the generated main function will look like this:
CPPTEST_ENTRY_POINT_RETURN_TYPE, CPPTEST_ENTRY_POINT_ARGS, CPPTEST_ENTRY_POINT_ARGC, CPPTEST_ENTRY_POINT_ARGV and CPPTEST_ENTRY_POINT_RETURN_STATEMENT have the following default values that can be redefined:
You can also define the CPPTEST_ENTRY_POINT_DEFINED macro. Defining this macro prevents the main routine from generating. In these cases, you need to call a
CppTest_Main(0, 0) function to execute the test cases.
If the custom (cross) compiler definition was added correctly and the prebuilt host C++test runtime library was replaced with the cross-compiled target-specific one (see Configuring Testing with the Cross Compiler), then C++test should be able to successfully perform almost all actions— except the steps used for starting the test executable and loading the test log files. These steps are described below.
libSymFile - Specifies the file with external symbols list to read. Optional.See Testing VxWorks DKM Projects,Providing an External List of Library Symbols, andGenerating an External VxWorks Image Symbols List.