TestApe supports cross compiling on intel platforms for the ARM processor through the use of arm-linux-gnueabi-testape.a. This library is available in the linux installation packages. Cross compilation is not supported on any of the windows packages.
The implementation uses the arm-linux-gnueabi GNU sstandard C library that ships with the gnueabi toolchain. As default this library uses the software floating point model, but technically there should be no reason why -mfloat-abi=softfp and mfloat-abi=hard should not work. Also other standard C libraries should work as long as they adhere to the EABI standard. The following example shows how to compile and execute a test with the cross compiler and run the test in QEMU arm emulator.
testape arm-linux-gnueabi-gcc -o sample1 sample1.c calc.c add.c arm-linux-gnueabi-testape.a qemu-arm -L /usr/arm-linux-gnueabi/lib/libc ./sample1
The gnueabi toolchain uses the software floating point model as default. It passes floating point value through the arm registers. The stack and register aligment as well as the floating point representation are affected by your choise of float versus double.
This is in contrast to the x86 platform which passes floating points on a seperate FPU stack and represents all type internally as 80 bit floating point. So on x86 it is not important, if your test do not accurately indicate if a return value is a floating point or not. TestApe will just push an integer representation onto the normal stack and a floating point representation onto the FPU stack.
However on the arm it is important that you cast the mock return value to the same return type as the mocked function would return normally. For example on Intel platforms this will work
but on ARM platforms you need to do this
EXPECT(function_returning_float,(float)10); EXPECT(function_returning_float,10.0f); EXPECT(function_returning_double,(double)10); EXPECT(function_returning_double,10.0);
Note, that this limiation only affects floating point return values - any other type of return value follows the same pattern as the x86 implementation.
It has been a long time since last official release and the list of bugfixes, features and supported platforms accumulating in the beta has grown substantially. I am happy to annouce that a new release is ready.more
New beta version is now available for download.more
New is this release are support for floating point validations and function mocking. Also, MinGW has been added to the list of supported platforms.more
TestApe forum is now hosted on Proboards. Support questions can be posted here or send directly on email. Due to ...more
TestApe can now be used with MinGW GCC on windows. Also supported in this beta are floating point types in validations or when mocking functionsmore
A small fix for webtty scripts, to allow the usage from Apple IPads. Tab on textarea to bring up IPad keyboard - you may have to scroll webpage beneath keyboard, in order to actually see what you're typing.
This release contains a new flexible mocking system with default mocks automatically generated for unresolved functions. Installation packages are available for GCC/Linux, GCC/CygWin as well Visual Studio 2009/Windows XP or Vista.more