Proton  1.1.1
Make porting easy from Python to C++11
unit_test.hpp
Go to the documentation of this file.
1 #ifndef PROTON_UT_H
2 #define PROTON_UT_H
3 
4 /** @file unit_test.hpp
5  * @brief a lite unit test framework.
6  */
7 
8 #include <vector>
9 
10 namespace proton{
11 namespace detail{
12 
13 /////////////////////////////
14 // unittest
15 
16 /** the prototype of unit test.
17  * @return 0 - success
18  */
19 typedef int (*unittest_t)();
20 
21 /** unit test executor.
22  * @param ut unit tests need to be tested.
23  * @return 0: succes, other: failure
24  */
25 int unittest_run(std::vector<unittest_t>& ut);
26 
27 }}
28 #endif // PROTON_UT_H