calculate depends upon the functions validate,
add, divide, multiply and subtract in order to
implement the calculations. For a given
test, there is a certain order in which these are executed. This is tested using
the macro EXPECT as it is shown in sample4 below.2.1
void test_addition(void) {
EXPECT( invalid );
EXPECT( invalid );
EXPECT( add );
calculate(3,7,'+');
}
With the EXPECT macro the test developer can indicate to the framework,
that this test expects invalid() and add() function calls during
calculate.
The framework detects the function calls made by calculate
and generates the output shown below
Executing test test_addition
Expecting function call to invalid
Expecting function call to invalid
Expecting function call to add
PASSED verify function call to invalid
expected .......... invalid
actual ............ invalid
PASSED verify function call to invalid
expected .......... invalid
actual ............ invalid
PASSED verify function call to add
expected .......... add
actual ............ add
PASSED test test_addition
The calculate function do not see any difference compared to its normal environment.
If the actual and expected function call resolves to a function that is not present in the unit, the framework will report that it is called and return 0 to the unit that is calling it.
If the expected function call resolves to a function that is present in the unit, the framework will simply report that it is called and afterwards call the function.
testape
New is this release are support for floating point validations and function mocking. Also, MinGW has been added to the list of supported platforms.
moreTestApe forum is now hosted on Proboards. Support questions can be posted here or send directly on email. Due to ...
moreTestApe can now be used with MinGW GCC on windows. Also supported in this beta are floating point types in validations or when mocking functions
moreA 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.
moreNew beta version is now available for download. This is the last beta before official release. The release supports an extensive mocking system.
moreThere is a change for the forum hosted on this site. The previous phpBB forum is closed for now. All forum threads will be migrated to a new simple blog. ...
more