在XCode中运用CPPUnit
Use CPPUnit with XCode
1. Download cppunti from sourceforge
2. Compile and install
./configure
make install
3. Create new C++ Tool project and add source files in cppunit/examples/simple except SimplePlugIn.cpp
4. Add the library libcppunit.dylib (/usr/local/lib) in the project also
5. Check the project properties, and remove below definition in Preprocessor key:
_GLIBCXX_DEBUG=1 _GLIBCXX_DEBUG_PEDANTIC=1
CPPUnit won't support universal binary well. So the testing project is only for native architecture of build machine.
What are these two macro definitions?
_GLIBCXX_DEBUG to enable stl debugging
_GLIBCXX_DEBUG_PEDANTIC, Which will force your app to use the __gnu_debug_def namespace for any stl containers