18 #include "gtest/gtest.h"
27 vsnprintf(buf, N, format, ap);
46 virtual void OnTestStart(
const testing::TestInfo& test_info) {
54 test_info.test_case_name(),
60 const testing::TestPartResult& test_part_result) {
61 if (!test_part_result.failed())
64 "*** Failure in %s:%d\n%s\n", test_part_result.file_name(),
65 test_part_result.line_number(), test_part_result.summary()));
79 int main(
int argc,
char **argv) {
80 testing::InitGoogleTest(&argc, argv);
82 testing::TestEventListeners& listeners =
83 testing::UnitTest::GetInstance()->listeners();
84 delete listeners.Release(listeners.default_result_printer());
87 return RUN_ALL_TESTS();
virtual void OnTestStart(const testing::TestInfo &test_info)
virtual void OnTestIterationStart(const testing::UnitTest &test_info, int iteration)
A test result printer that's less wordy than gtest's default.
void PrintOnNewLine(const string &to_print)
Prints a string on a new line, not overprinting previous output.
virtual void OnTestProgramStart(const testing::UnitTest &unit_test)
virtual void OnTestPartResult(const testing::TestPartResult &test_part_result)
int main(int argc, char **argv)
string StringPrintf(const char *format,...)
virtual void OnTestProgramEnd(const testing::UnitTest &unit_test)
Prints lines of text, possibly overprinting previously printed lines if the terminal supports it...
void Print(string to_print, LineType type)
Overprints the current line.