Post by Martin Nielsen on Sept 30, 2011 9:52:51 GMT -5
April 2nd 2010, Release 791
•Full mock support for function and library calls.
In this release all functions can be mocked. That includes functions that are internal to the unit or functions called in C library. Every test can supply its own individual mock. This will be in scope during that test only. Test suites can supply mocks that will remain in scope for the entire testsuite. The mock can validate the parameters and/or call the function it mocks.
•Automatic default mocks for unresolved externals.
Mocking functions explicitly is possibility. As default the instrumenter will supply default mocks for all unresolved externals. Units with extensive use of external interfaces can have a test running immediately - no need to write dummy stub functions.
•New macros ALLOW, ALLOW_SIMULATE and ALLOW_VALIDATE implemented.
These new macros allows you to pass control to a mock function. The scope of these macros defines when a mock is called and what happens after. When a mocked function is called, the framework can either return a specific value to the unit each time or invoke the supplied mock. The mock can choose to give back control to the mocked function. This is powerful as generic validation of parameters to functions - for example the format string and parameters of printf.
•Other features
◦Option to limit amount of tests from commandline. e.g. --> testexe 5-7 will execute testcase 5,6 and 7. testexe e1 will execute first testcase with an error.
◦Examples from documentation added to installation.
◦Improved debug support with testape_error_handler.
◦All functions (also C library functions used by the framework) can now be mocked.
◦Instrumenter will notify when a new release becomes available.
◦Mocked function and its current replacement shown in log.
◦New instrumenter options -o and -v to help troubleshooting.
◦Testcode can be written to produce consistent results when the amount of object files in the unit are changed. If object files are removed, default mocks are automatically supplied. If object files are added, the new functions are automatically mocked in existing tests.
•Fixed bugs
◦Bugfix: gcc -m32 is now passed correctly.
◦Bugfix: Support new versions of cl/link in Microsoft Visual Studio C++ 2008.
◦Bugfix: Support new versions of gcc in CygWin and Linux.
◦Bugfix: Mock return values could in rare cases become corrupted.
◦Bugfix: Added error message when instrumenter could not create temporary files.
◦Bugfix: Instrumenter allows gcc with -ltestape, so testape.a will be loaded from lib path.
◦Bugfix: testape_cache .ini style file handling improved.
◦Bugfix: Mocked static functions will break instrumentation.
•Full mock support for function and library calls.
In this release all functions can be mocked. That includes functions that are internal to the unit or functions called in C library. Every test can supply its own individual mock. This will be in scope during that test only. Test suites can supply mocks that will remain in scope for the entire testsuite. The mock can validate the parameters and/or call the function it mocks.
•Automatic default mocks for unresolved externals.
Mocking functions explicitly is possibility. As default the instrumenter will supply default mocks for all unresolved externals. Units with extensive use of external interfaces can have a test running immediately - no need to write dummy stub functions.
•New macros ALLOW, ALLOW_SIMULATE and ALLOW_VALIDATE implemented.
These new macros allows you to pass control to a mock function. The scope of these macros defines when a mock is called and what happens after. When a mocked function is called, the framework can either return a specific value to the unit each time or invoke the supplied mock. The mock can choose to give back control to the mocked function. This is powerful as generic validation of parameters to functions - for example the format string and parameters of printf.
•Other features
◦Option to limit amount of tests from commandline. e.g. --> testexe 5-7 will execute testcase 5,6 and 7. testexe e1 will execute first testcase with an error.
◦Examples from documentation added to installation.
◦Improved debug support with testape_error_handler.
◦All functions (also C library functions used by the framework) can now be mocked.
◦Instrumenter will notify when a new release becomes available.
◦Mocked function and its current replacement shown in log.
◦New instrumenter options -o and -v to help troubleshooting.
◦Testcode can be written to produce consistent results when the amount of object files in the unit are changed. If object files are removed, default mocks are automatically supplied. If object files are added, the new functions are automatically mocked in existing tests.
•Fixed bugs
◦Bugfix: gcc -m32 is now passed correctly.
◦Bugfix: Support new versions of cl/link in Microsoft Visual Studio C++ 2008.
◦Bugfix: Support new versions of gcc in CygWin and Linux.
◦Bugfix: Mock return values could in rare cases become corrupted.
◦Bugfix: Added error message when instrumenter could not create temporary files.
◦Bugfix: Instrumenter allows gcc with -ltestape, so testape.a will be loaded from lib path.
◦Bugfix: testape_cache .ini style file handling improved.
◦Bugfix: Mocked static functions will break instrumentation.