diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-24 21:15:59 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-24 21:15:59 +0000 |
commit | b50ef44a3527d958270ff1f08cb99e3ac633bd17 (patch) | |
tree | ceb0f9819c41f511d74cf72066ec48620dea8caa /test/gtest_xml_output_unittest_.cc | |
parent | 7fba282ce74ce527cba5c686945d18ae1b7cb3d2 (diff) | |
download | googletest-b50ef44a3527d958270ff1f08cb99e3ac633bd17.tar.gz googletest-b50ef44a3527d958270ff1f08cb99e3ac633bd17.tar.bz2 googletest-b50ef44a3527d958270ff1f08cb99e3ac633bd17.zip |
Publishes the even listener API (by Vlad Losev); adds OS-indicating macros to simplify gtest code (by Zhanyong Wan).
Diffstat (limited to 'test/gtest_xml_output_unittest_.cc')
-rw-r--r-- | test/gtest_xml_output_unittest_.cc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/test/gtest_xml_output_unittest_.cc b/test/gtest_xml_output_unittest_.cc index bfeda3d8..c0da2151 100644 --- a/test/gtest_xml_output_unittest_.cc +++ b/test/gtest_xml_output_unittest_.cc @@ -40,19 +40,9 @@ #include <gtest/gtest.h> -// TODO(vladl@google.com): Remove this include when the event listener API is -// published and GetUnitTestImpl is no longer needed. -// -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - +using ::testing::EventListeners; using ::testing::InitGoogleTest; +using ::testing::UnitTest; class SuccessfulTest : public testing::Test { }; @@ -137,11 +127,7 @@ int main(int argc, char** argv) { InitGoogleTest(&argc, argv); if (argc > 1 && strcmp(argv[1], "--shut_down_xml") == 0) { - // TODO(vladl@google.com): Replace GetUnitTestImpl()->listeners() with - // UnitTest::GetInstance()->listeners() when the event listener API is - // published. - ::testing::internal::EventListeners& listeners = - *::testing::internal::GetUnitTestImpl()->listeners(); + EventListeners& listeners = UnitTest::GetInstance()->listeners(); delete listeners.Release(listeners.default_xml_generator()); } return RUN_ALL_TESTS(); |