Generates a default mock.
The MOCK macro will generate a mock function called name. The mock function replaces and simulates functions, that are called by the unit but not available during the test. It reports to the framework, whenever a function call to name is detected. This allows the framework to validate, that the parameters are correct, and that the function call occurs at the right time.
The prototype for a mock function can be a function prototype of any kind. The MOCK macro will generate functions taking no parameters and returning nothing, e.g. void name(void). The function it replaces will most likely have another prototype, but the differences are not important to the test.
The instrumenter will normally generate default mock functions for you, but this macro is available, if you are not using the instrumenter.
This macro cannot be used together with earlier prototype declarations of name. If you experience compilation problems due to this, there are two solutions - either use the correct prototype (for the test it does not matter), or use the MOCK macro from within a file, that does not include the real function declaration.
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