Makes gtest compile clean with MSVC's warning 4100 (unused formal parameter) enabled.
This commit is contained in:
parent
f07dc6b1b1
commit
12d740faef
@ -725,8 +725,8 @@ class TypeParameterizedTestCase {
|
|||||||
template <GTEST_TEMPLATE_ Fixture, typename Types>
|
template <GTEST_TEMPLATE_ Fixture, typename Types>
|
||||||
class TypeParameterizedTestCase<Fixture, Templates0, Types> {
|
class TypeParameterizedTestCase<Fixture, Templates0, Types> {
|
||||||
public:
|
public:
|
||||||
static bool Register(const char* prefix, const char* case_name,
|
static bool Register(const char* /*prefix*/, const char* /*case_name*/,
|
||||||
const char* test_names) {
|
const char* /*test_names*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -99,10 +99,6 @@ class SConstructHelper:
|
|||||||
# Disables warnings that are either uninteresting or
|
# Disables warnings that are either uninteresting or
|
||||||
# hard to fix.
|
# hard to fix.
|
||||||
|
|
||||||
'/wd4100',
|
|
||||||
# unreferenced formal parameter. The violation is in
|
|
||||||
# gcc's TR1 tuple and hard to fix.
|
|
||||||
|
|
||||||
'/wd4127',
|
'/wd4127',
|
||||||
# constant conditional expression. The macro
|
# constant conditional expression. The macro
|
||||||
# GTEST_IS_NULL_LITERAL_() triggers it and I cannot find
|
# GTEST_IS_NULL_LITERAL_() triggers it and I cannot find
|
||||||
|
@ -4134,7 +4134,8 @@ TestInfoImpl::~TestInfoImpl() {
|
|||||||
// For example, if Foo() calls Bar(), which in turn calls
|
// For example, if Foo() calls Bar(), which in turn calls
|
||||||
// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
|
// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
|
||||||
// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
|
// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
|
||||||
String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test, int skip_count) {
|
String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
|
||||||
|
int skip_count) {
|
||||||
// We pass skip_count + 1 to skip this wrapper function in addition
|
// We pass skip_count + 1 to skip this wrapper function in addition
|
||||||
// to what the user really wants to skip.
|
// to what the user really wants to skip.
|
||||||
return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
|
return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
|
||||||
|
@ -824,9 +824,10 @@ void MockDeathTestFactory::SetParameters(bool create,
|
|||||||
// Sets test to NULL (if create_ is false) or to the address of a new
|
// Sets test to NULL (if create_ is false) or to the address of a new
|
||||||
// MockDeathTest object with parameters taken from the last call
|
// MockDeathTest object with parameters taken from the last call
|
||||||
// to SetParameters (if create_ is true). Always returns true.
|
// to SetParameters (if create_ is true). Always returns true.
|
||||||
bool MockDeathTestFactory::Create(const char* statement,
|
bool MockDeathTestFactory::Create(const char* /*statement*/,
|
||||||
const ::testing::internal::RE* regex,
|
const ::testing::internal::RE* /*regex*/,
|
||||||
const char* file, int line,
|
const char* /*file*/,
|
||||||
|
int /*line*/,
|
||||||
DeathTest** test) {
|
DeathTest** test) {
|
||||||
test_deleted_ = false;
|
test_deleted_ = false;
|
||||||
if (create_) {
|
if (create_) {
|
||||||
|
@ -74,47 +74,47 @@ class UnitTestAccessor {
|
|||||||
|
|
||||||
class EventRecordingListener : public UnitTestEventListenerInterface {
|
class EventRecordingListener : public UnitTestEventListenerInterface {
|
||||||
protected:
|
protected:
|
||||||
virtual void OnUnitTestStart(const UnitTest& unit_test) {
|
virtual void OnUnitTestStart(const UnitTest& /*unit_test*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnUnitTestStart"));
|
g_events->PushBack(String("TestEventListener::OnUnitTestStart"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnGlobalSetUpStart(const UnitTest& unit_test) {
|
virtual void OnGlobalSetUpStart(const UnitTest& /*unit_test*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnGlobalSetUpStart"));
|
g_events->PushBack(String("TestEventListener::OnGlobalSetUpStart"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnGlobalSetUpEnd(const UnitTest& unit_test) {
|
virtual void OnGlobalSetUpEnd(const UnitTest& /*unit_test*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnGlobalSetUpEnd"));
|
g_events->PushBack(String("TestEventListener::OnGlobalSetUpEnd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnTestCaseStart(const TestCase& test_case) {
|
virtual void OnTestCaseStart(const TestCase& /*test_case*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnTestCaseStart"));
|
g_events->PushBack(String("TestEventListener::OnTestCaseStart"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnTestStart(const TestInfo& test_info) {
|
virtual void OnTestStart(const TestInfo& /*test_info*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnTestStart"));
|
g_events->PushBack(String("TestEventListener::OnTestStart"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnNewTestPartResult(const TestPartResult& test_part_result) {
|
virtual void OnNewTestPartResult(const TestPartResult& /*test_part_result*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnNewTestPartResult"));
|
g_events->PushBack(String("TestEventListener::OnNewTestPartResult"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnTestEnd(const TestInfo& test_info) {
|
virtual void OnTestEnd(const TestInfo& /*test_info*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnTestEnd"));
|
g_events->PushBack(String("TestEventListener::OnTestEnd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnTestCaseEnd(const TestCase& test_case) {
|
virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnTestCaseEnd"));
|
g_events->PushBack(String("TestEventListener::OnTestCaseEnd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnGlobalTearDownStart(const UnitTest& unit_test) {
|
virtual void OnGlobalTearDownStart(const UnitTest& /*unit_test*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnGlobalTearDownStart"));
|
g_events->PushBack(String("TestEventListener::OnGlobalTearDownStart"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnGlobalTearDownEnd(const UnitTest& unit_test) {
|
virtual void OnGlobalTearDownEnd(const UnitTest& /*unit_test*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnGlobalTearDownEnd"));
|
g_events->PushBack(String("TestEventListener::OnGlobalTearDownEnd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnUnitTestEnd(const UnitTest& unit_test) {
|
virtual void OnUnitTestEnd(const UnitTest& /*unit_test*/) {
|
||||||
g_events->PushBack(String("TestEventListener::OnUnitTestEnd"));
|
g_events->PushBack(String("TestEventListener::OnUnitTestEnd"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user