mirror of
https://github.com/google/googletest.git
synced 2024-12-27 10:11:03 +08:00
Apply clang-tidy fixes
PiperOrigin-RevId: 514936218 Change-Id: I24c443a2ca75c875052b0cf2d0a48e808d03ae43
This commit is contained in:
parent
a798c2f102
commit
82a570453c
@ -38,13 +38,7 @@
|
|||||||
#include "gtest/internal/custom/gtest.h"
|
#include "gtest/internal/custom/gtest.h"
|
||||||
|
|
||||||
using ::testing::AddGlobalTestEnvironment;
|
using ::testing::AddGlobalTestEnvironment;
|
||||||
using ::testing::Environment;
|
|
||||||
using ::testing::InitGoogleTest;
|
using ::testing::InitGoogleTest;
|
||||||
using ::testing::Test;
|
|
||||||
using ::testing::TestEventListener;
|
|
||||||
using ::testing::TestInfo;
|
|
||||||
using ::testing::TestPartResult;
|
|
||||||
using ::testing::TestSuite;
|
|
||||||
using ::testing::UnitTest;
|
using ::testing::UnitTest;
|
||||||
|
|
||||||
// Used by tests to register their events.
|
// Used by tests to register their events.
|
||||||
@ -278,7 +272,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
AddGlobalTestEnvironment(new EnvironmentInvocationCatcher);
|
AddGlobalTestEnvironment(new EnvironmentInvocationCatcher);
|
||||||
|
|
||||||
GTEST_CHECK_(events.size() == 0)
|
GTEST_CHECK_(events.empty())
|
||||||
<< "AddGlobalTestEnvironment should not generate any events itself.";
|
<< "AddGlobalTestEnvironment should not generate any events itself.";
|
||||||
|
|
||||||
GTEST_FLAG_SET(repeat, 2);
|
GTEST_FLAG_SET(repeat, 2);
|
||||||
|
@ -1025,7 +1025,7 @@ int main(int argc, char** argv) {
|
|||||||
std::string("internal_skip_environment_and_ad_hoc_tests")) > 0;
|
std::string("internal_skip_environment_and_ad_hoc_tests")) > 0;
|
||||||
|
|
||||||
#ifdef GTEST_HAS_DEATH_TEST
|
#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
|
// Skip the usual output capturing if we're running as the child
|
||||||
// process of an threadsafe-style death test.
|
// process of an threadsafe-style death test.
|
||||||
#if defined(GTEST_OS_WINDOWS)
|
#if defined(GTEST_OS_WINDOWS)
|
||||||
|
@ -221,7 +221,7 @@ class DogAdder {
|
|||||||
}
|
}
|
||||||
DogAdder operator+(const DogAdder& other) const {
|
DogAdder operator+(const DogAdder& other) const {
|
||||||
Message msg;
|
Message msg;
|
||||||
msg << value_.c_str() << other.value_.c_str();
|
msg << value_ << other.value_;
|
||||||
return DogAdder(msg.GetString().c_str());
|
return DogAdder(msg.GetString().c_str());
|
||||||
}
|
}
|
||||||
bool operator<(const DogAdder& other) const { return value_ < other.value_; }
|
bool operator<(const DogAdder& other) const { return value_ < other.value_; }
|
||||||
|
@ -266,7 +266,6 @@ using ::std::set;
|
|||||||
using ::std::vector;
|
using ::std::vector;
|
||||||
using ::testing::PrintToString;
|
using ::testing::PrintToString;
|
||||||
using ::testing::internal::FormatForComparisonFailureMessage;
|
using ::testing::internal::FormatForComparisonFailureMessage;
|
||||||
using ::testing::internal::ImplicitCast_;
|
|
||||||
using ::testing::internal::NativeArray;
|
using ::testing::internal::NativeArray;
|
||||||
using ::testing::internal::RelationToSourceReference;
|
using ::testing::internal::RelationToSourceReference;
|
||||||
using ::testing::internal::Strings;
|
using ::testing::internal::Strings;
|
||||||
|
@ -35,7 +35,6 @@ namespace {
|
|||||||
|
|
||||||
using ::testing::EmptyTestEventListener;
|
using ::testing::EmptyTestEventListener;
|
||||||
using ::testing::InitGoogleTest;
|
using ::testing::InitGoogleTest;
|
||||||
using ::testing::Message;
|
|
||||||
using ::testing::Test;
|
using ::testing::Test;
|
||||||
using ::testing::TestEventListeners;
|
using ::testing::TestEventListeners;
|
||||||
using ::testing::TestInfo;
|
using ::testing::TestInfo;
|
||||||
|
@ -211,7 +211,6 @@ using testing::TestPartResult;
|
|||||||
using testing::TestPartResultArray;
|
using testing::TestPartResultArray;
|
||||||
using testing::TestProperty;
|
using testing::TestProperty;
|
||||||
using testing::TestResult;
|
using testing::TestResult;
|
||||||
using testing::TestSuite;
|
|
||||||
using testing::TimeInMillis;
|
using testing::TimeInMillis;
|
||||||
using testing::UnitTest;
|
using testing::UnitTest;
|
||||||
using testing::internal::AlwaysFalse;
|
using testing::internal::AlwaysFalse;
|
||||||
@ -227,7 +226,6 @@ using testing::internal::FloatingPoint;
|
|||||||
using testing::internal::ForEach;
|
using testing::internal::ForEach;
|
||||||
using testing::internal::FormatEpochTimeInMillisAsIso8601;
|
using testing::internal::FormatEpochTimeInMillisAsIso8601;
|
||||||
using testing::internal::FormatTimeInMillisAsSeconds;
|
using testing::internal::FormatTimeInMillisAsSeconds;
|
||||||
using testing::internal::GetCurrentOsStackTraceExceptTop;
|
|
||||||
using testing::internal::GetElementOr;
|
using testing::internal::GetElementOr;
|
||||||
using testing::internal::GetNextRandomSeed;
|
using testing::internal::GetNextRandomSeed;
|
||||||
using testing::internal::GetRandomSeedFromFlag;
|
using testing::internal::GetRandomSeedFromFlag;
|
||||||
@ -244,8 +242,6 @@ using testing::internal::IsNotContainer;
|
|||||||
using testing::internal::kMaxRandomSeed;
|
using testing::internal::kMaxRandomSeed;
|
||||||
using testing::internal::kTestTypeIdInGoogleTest;
|
using testing::internal::kTestTypeIdInGoogleTest;
|
||||||
using testing::internal::NativeArray;
|
using testing::internal::NativeArray;
|
||||||
using testing::internal::OsStackTraceGetter;
|
|
||||||
using testing::internal::OsStackTraceGetterInterface;
|
|
||||||
using testing::internal::ParseFlag;
|
using testing::internal::ParseFlag;
|
||||||
using testing::internal::RelationToSourceCopy;
|
using testing::internal::RelationToSourceCopy;
|
||||||
using testing::internal::RelationToSourceReference;
|
using testing::internal::RelationToSourceReference;
|
||||||
@ -259,7 +255,6 @@ using testing::internal::StreamableToString;
|
|||||||
using testing::internal::String;
|
using testing::internal::String;
|
||||||
using testing::internal::TestEventListenersAccessor;
|
using testing::internal::TestEventListenersAccessor;
|
||||||
using testing::internal::TestResultAccessor;
|
using testing::internal::TestResultAccessor;
|
||||||
using testing::internal::UnitTestImpl;
|
|
||||||
using testing::internal::WideStringToUtf8;
|
using testing::internal::WideStringToUtf8;
|
||||||
using testing::internal::edit_distance::CalculateOptimalEdits;
|
using testing::internal::edit_distance::CalculateOptimalEdits;
|
||||||
using testing::internal::edit_distance::CreateUnifiedDiff;
|
using testing::internal::edit_distance::CreateUnifiedDiff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user