-
Notifications
You must be signed in to change notification settings - Fork 1
/
README_Symbian.txt
36 lines (25 loc) · 1.32 KB
/
README_Symbian.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
CppUTest on Symbian
Compliling
To compile CppUTest you need to have Symbian Posix libraries installed. On S60 it's
recommended to use S60 Open C. On other platforms one can use Symbian PIPS. Compiling is
in standard way, by issuing from command line commands bldmake bldfiles && abld build in
build-directory. You can also import the project's bld.inf file into Carbide in normal way.
Writing tests
CppUTest exports the needed header files into \epoc32\include\CppUTest -directory. Add the directory
to the include-path of the test project. One needs to include TestHarness.h file into test source
file. The test project must link against cpputest.lib using STATICLIBRARY statement in MMP-file.
CppUTest depends also on standard C-library so the tests must be linked against libc as well.
The entry point file of the tests is normally the following:
#include <CppUTest/CommandLineTestRunner.h>
#include <stdio.h>
// This is a GCCE toolchain workaround needed when compiling with GCCE
// and using main() entry point
#ifdef __GCCE__
#include <staticlibinit_gcce.h>
#endif
int main(int argc, char** argv)
{
CommandLineTestRunner::RunAllTests(argc, argv);
}
The test must be statically linked against libcrt0.lib if standard main (not E32Main) is used as above.
For the further example, please consult alltests.mmp in build directory.