In its simplest form, a unit test can be non-UI executable, where the exit code is used to decide whether the test succeeded or not. The executable can be implemented to run one or more tests. When there are many tests it is easier to create frameworks, which will automatically create an environment for the test, and then execute the small test piece and report results. These kinds of frameworks are called test frameworks.
EUnit is a an example of a commercial solution, whereas SymbianOSUnit is available at no cost. In this section, SymbianOSUnit is used for demonstrating purposes due to its free availability. For large-scale development, commercial solutions are recommended because they provide features (see, for example, EUnit key features) that require time and money when implemented from scratch.
In this section, the S60 Platform: Location Example is extended with tests for demonstrating
purposes. In real life, unit tests should be written during the development
stage of the project, before concrete classes are implemented. Unit tests
are created for class CMapExampleSmsEngine
This Symbian C++ unit test case gives instructions for the following:
The complete example code is available at TestSource.cpp.