2015-10-30 13:14:28 -03:00
|
|
|
/*
|
|
|
|
* Utility header for unit tests with gtest.
|
|
|
|
*/
|
2020-05-03 08:34:01 -03:00
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
2015-10-30 13:14:28 -03:00
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
2016-04-11 11:00:13 -03:00
|
|
|
|
|
|
|
#define AP_GTEST_PRINTATBLE_PARAM_MEMBER(class_name_, printable_member_) \
|
2020-05-03 08:34:01 -03:00
|
|
|
::std::ostream& operator<<(::std::ostream& os, const class_name_& param); \
|
2016-04-11 11:00:13 -03:00
|
|
|
::std::ostream& operator<<(::std::ostream& os, const class_name_& param) \
|
|
|
|
{ \
|
|
|
|
return os << param.printable_member_; \
|
|
|
|
}
|
|
|
|
|
2015-10-30 13:14:28 -03:00
|
|
|
#define AP_GTEST_MAIN() \
|
|
|
|
int main(int argc, char *argv[]) \
|
|
|
|
{ \
|
|
|
|
::testing::InitGoogleTest(&argc, argv); \
|
|
|
|
return RUN_ALL_TESTS(); \
|
|
|
|
}
|