14. boost::bind
A generalization of the standard functions std::bind1st and
std::bind2nd.
Supports: function objects, functions, function pointers, and
member function pointers
Able to bind any argument to a specific value or route input
arguments into arbitrary positions.
Function object
14
17. googletest - Unit Testing Framework
Execute test cases through the GUI
Google test framework
(gtest)
• Easy to execute
• Easy to implement test cases
“Unicode Debug-test” configuration Execute test cases in console
17
18. gtest is more lightweight than cppunit
Cppunit gtest
1. Write a test class derived from
TestFixture 1. One TEST macro
2. Write setup
3. Write teardown
4. Write test method
5. Define test suite
6. Context-switch between .h/.cpp
files
18
19. Basic concepts
Start by writing ASSERTIONS
• statements that check whether a condition is true.
• success, nonfatal failure, or fatal failure.
A test case contains one or many tests.
A test program can contain multiple test cases.
19