googletest-color-test_.cc (googletest-release-1.11.0) | : | googletest-color-test_.cc (googletest-release-1.12.0) | ||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
#include "gtest/gtest.h" | #include "gtest/gtest.h" | |||
#include "src/gtest-internal-inl.h" | #include "src/gtest-internal-inl.h" | |||
using testing::internal::ShouldUseColor; | using testing::internal::ShouldUseColor; | |||
// The purpose of this is to ensure that the UnitTest singleton is | // The purpose of this is to ensure that the UnitTest singleton is | |||
// created before main() is entered, and thus that ShouldUseColor() | // created before main() is entered, and thus that ShouldUseColor() | |||
// works the same way as in a real Google-Test-based test. We don't actual | // works the same way as in a real Google-Test-based test. We don't actual | |||
// run the TEST itself. | // run the TEST itself. | |||
TEST(GTestColorTest, Dummy) { | TEST(GTestColorTest, Dummy) {} | |||
} | ||||
int main(int argc, char** argv) { | int main(int argc, char** argv) { | |||
testing::InitGoogleTest(&argc, argv); | testing::InitGoogleTest(&argc, argv); | |||
if (ShouldUseColor(true)) { | if (ShouldUseColor(true)) { | |||
// Google Test decides to use colors in the output (assuming it | // Google Test decides to use colors in the output (assuming it | |||
// goes to a TTY). | // goes to a TTY). | |||
printf("YES\n"); | printf("YES\n"); | |||
return 1; | return 1; | |||
} else { | } else { | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added |