If you are using a compiler on a platform not directly supported you must
setup your own project files for your compiler. All adjustments are done in
mockpp.h
. To benefit from updates it is of
course better to move your own settings to a configuration file and include it.
See config-bcb5.h
as an example for Borland's
CBuilder.
The following options are used to manually tweak the library:
MOCKPP_UNICODE
Enable unicode characters (based on wchar_t) instead
of ascii characters.There are some related macros. MOCKPP_PCHAR
and MOCKPP_CHAR
are used to mark literal character strings
either with or without leading "L".
MOCKPP_STRING
and MOCKPP_PCSTRING
are
used to create a String variable.
MOCKPP_EXPORT
Some platforms export only explicitly tagged elements in dynamic libraries. Other elements can't be linked from other binaries. This macro hides such an export declaration.
MOCKPP_USE_MINI_STL
Use the built-in alternative STL implementation instead of the
STL that comes with the C++ compiler to try to save memory resources.
If you use CxxTest CXXTEST_USE_MINI_STL
should also be
defined.
If you want to use another STL you have to extend the according section
in mockpp.h
. Search for MOCKPP_USE_MINI_STL
and add an appropriate section similar to the one for
ministl. Do the same for CxxTest in
3party/cxxtest/cxxtest/Flags.h
MOCKPP_NO_RTTI
Disable all features that are based on runtime type information to reduce the library size.
MOCKPP_NO_EXCEPTIONS
Disable exception handling to reduce the library size. If you do not use the built-in CxxTest you probably need to adjust the handling of failures. See Section 1.6.2, “The Solution” for a list of the according macros.
MOCKPP_USE_CPPUNIT
Use CppUnit as framework for fow control.
MOCKPP_USE_CXXTEST
Use CxxTest as framework for fow control.
MOCKPP_USE_BOOSTTEST
Use Boost.Test as framework for fow control.
MOCKPP_BOUNDARY_DELTA
Include source code for
ExpectationBoundary::setExpectedDelta()
MOCKPP_USE_STD_EXCEPTION
Derive mockpp::Exception
from std::exception
MOCKPP_MAKE_CHAR_READABLE
Display non-printable characters in a more readable form.
There are more predefined options of less interest in mockpp.h
.
Once you have ported mockpp to a new platform: | |
---|---|
Please send me your files for inclusion in the next distribution. You will certainly make some people happy with this. |