Update: The users of some a bit exotic SDKs reported that they cannot build the example. The reason was the project file SampleTest.mmp. I updated it making the project file a bit redundant. Now example should be compilable on any S60 SDK.
CppUTest is a unit testing framework based on CppUnitLite and designed for the embedded systems usage. Lately it has been ported to Symbian OS used in Nokia S60 smartphones. The framework is xUnit compatible, extremely simple and easy to use. It can print the test results both to console and to a junit-like xml file (later I am going to investigate how well it can be parsed by standard junit output parsers).
Symbian extension. Usage example
Unfortunately, CppUTest package at the moment does not include a full-blown Symbian specific example and lacks support for such Symbian primitives as descriptors (Symbian strings) and leaves (Symbian exceptions).
The file attached to this post contains both. It is a simple and heavily commented example of using CppUTest in Symbian, that includes cpputestsymbianextension.h adding support for descriptors and leaves. The project is licensed under BSD so you can use it for commercial purposes or even resell it. If even BSD is too restrictive for you, contact me and we'll work some solution out.
| Attachment | Size |
|---|---|
| SampleTest.zip | 14.64 KB |
Comments
about Error
March 10, 2008 by Vadiraj (not verified), 1 year 48 weeks ago
Comment id: 1479
On compiling CppUTest im getting the following error:
In file included from /usr/include/cppunit/TestAssert.h:7,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /cpp/CppUTest/include/CppUTest/extensions/HelperMacros.h:9,
from hello.cpp:8:
/usr/include/cppunit/portability/Stream.h:319:5: #error Cannot define CppUnit::OStringStream.
make[2]: *** [depend] Error 1
make[2]: Leaving directory `/cpp/CppUTest/examples/triangle'
make[1]: *** [depend] Error 2
make[1]: Leaving directory `/cpp/CppUTest/examples'
make: *** [depend] Error 2
so plz.. help me out to remove this error.
Post new comment