diff --git a/googletest/test/googletest-listener-test.cc b/googletest/test/googletest-listener-test.cc index 89d01b37..654486d7 100644 --- a/googletest/test/googletest-listener-test.cc +++ b/googletest/test/googletest-listener-test.cc @@ -38,13 +38,7 @@ #include "gtest/internal/custom/gtest.h" using ::testing::AddGlobalTestEnvironment; -using ::testing::Environment; using ::testing::InitGoogleTest; -using ::testing::Test; -using ::testing::TestEventListener; -using ::testing::TestInfo; -using ::testing::TestPartResult; -using ::testing::TestSuite; using ::testing::UnitTest; // Used by tests to register their events. @@ -278,7 +272,7 @@ int main(int argc, char** argv) { AddGlobalTestEnvironment(new EnvironmentInvocationCatcher); - GTEST_CHECK_(events.size() == 0) + GTEST_CHECK_(events.empty()) << "AddGlobalTestEnvironment should not generate any events itself."; GTEST_FLAG_SET(repeat, 2); diff --git a/googletest/test/googletest-output-test_.cc b/googletest/test/googletest-output-test_.cc index 1a496ac8..44d0fc13 100644 --- a/googletest/test/googletest-output-test_.cc +++ b/googletest/test/googletest-output-test_.cc @@ -1025,7 +1025,7 @@ int main(int argc, char** argv) { std::string("internal_skip_environment_and_ad_hoc_tests")) > 0; #ifdef GTEST_HAS_DEATH_TEST - if (GTEST_FLAG_GET(internal_run_death_test) != "") { + if (!GTEST_FLAG_GET(internal_run_death_test).empty()) { // Skip the usual output capturing if we're running as the child // process of an threadsafe-style death test. #if defined(GTEST_OS_WINDOWS) diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index 63db2860..c9c5e78e 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -221,7 +221,7 @@ class DogAdder { } DogAdder operator+(const DogAdder& other) const { Message msg; - msg << value_.c_str() << other.value_.c_str(); + msg << value_ << other.value_; return DogAdder(msg.GetString().c_str()); } bool operator<(const DogAdder& other) const { return value_ < other.value_; } diff --git a/googletest/test/googletest-printers-test.cc b/googletest/test/googletest-printers-test.cc index 5fdc0867..401e0463 100644 --- a/googletest/test/googletest-printers-test.cc +++ b/googletest/test/googletest-printers-test.cc @@ -266,7 +266,6 @@ using ::std::set; using ::std::vector; using ::testing::PrintToString; using ::testing::internal::FormatForComparisonFailureMessage; -using ::testing::internal::ImplicitCast_; using ::testing::internal::NativeArray; using ::testing::internal::RelationToSourceReference; using ::testing::internal::Strings; diff --git a/googletest/test/googletest-shuffle-test_.cc b/googletest/test/googletest-shuffle-test_.cc index a14e22f9..b570c488 100644 --- a/googletest/test/googletest-shuffle-test_.cc +++ b/googletest/test/googletest-shuffle-test_.cc @@ -35,7 +35,6 @@ namespace { using ::testing::EmptyTestEventListener; using ::testing::InitGoogleTest; -using ::testing::Message; using ::testing::Test; using ::testing::TestEventListeners; using ::testing::TestInfo; diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index aea8e1f2..768911ab 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -211,7 +211,6 @@ using testing::TestPartResult; using testing::TestPartResultArray; using testing::TestProperty; using testing::TestResult; -using testing::TestSuite; using testing::TimeInMillis; using testing::UnitTest; using testing::internal::AlwaysFalse; @@ -227,7 +226,6 @@ using testing::internal::FloatingPoint; using testing::internal::ForEach; using testing::internal::FormatEpochTimeInMillisAsIso8601; using testing::internal::FormatTimeInMillisAsSeconds; -using testing::internal::GetCurrentOsStackTraceExceptTop; using testing::internal::GetElementOr; using testing::internal::GetNextRandomSeed; using testing::internal::GetRandomSeedFromFlag; @@ -244,8 +242,6 @@ using testing::internal::IsNotContainer; using testing::internal::kMaxRandomSeed; using testing::internal::kTestTypeIdInGoogleTest; using testing::internal::NativeArray; -using testing::internal::OsStackTraceGetter; -using testing::internal::OsStackTraceGetterInterface; using testing::internal::ParseFlag; using testing::internal::RelationToSourceCopy; using testing::internal::RelationToSourceReference; @@ -259,7 +255,6 @@ using testing::internal::StreamableToString; using testing::internal::String; using testing::internal::TestEventListenersAccessor; using testing::internal::TestResultAccessor; -using testing::internal::UnitTestImpl; using testing::internal::WideStringToUtf8; using testing::internal::edit_distance::CalculateOptimalEdits; using testing::internal::edit_distance::CreateUnifiedDiff;