Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class customListener : public testing::EmptyTestEventListener
- {
- customListener(int *iteration) : m_iteration(iteration) {}
- virtual void OnTestIterationStart(const testing::UnitTest& unit_test, int iteration)
- {
- *m_iteration = iteration;
- }
- }
- int g_iteration;
- int main(int argc, char **argv)
- {
- testing::InitGoogleTest(&argc, argv);
- if(argc > 1)
- g_array_length = atoi(argv[1]);
- testing::TestEventListeners& listners = testing::UnitTest::GetInstance()->listeners();
- listners.Append(new printers::customListener(&g_iteration));
- return RUN_ALL_TESTS();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement