summaryrefslogtreecommitdiff
path: root/src/gtest.cc
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 19:54:05 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 19:54:05 +0000
commit7de3401f5f8c2a61476a3623e9802f973764fc27 (patch)
tree59322de2099c9879b4a10a298ecf6e6b03a63ace /src/gtest.cc
parent348b01a2d08593bd4cb9739a83038143f860edff (diff)
downloadgoogletest-7de3401f5f8c2a61476a3623e9802f973764fc27.tar.gz
Turns on -Wshadow (by Preston Jackson).
git-svn-id: http://googletest.googlecode.com/svn/trunk@350 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest.cc')
-rw-r--r--src/gtest.cc43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/gtest.cc b/src/gtest.cc
index aa50b25..bd16bc6 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -2123,14 +2123,14 @@ bool Test::HasNonfatalFailure() {
// Constructs a TestInfo object. It assumes ownership of the test factory
// object via impl_.
-TestInfo::TestInfo(const char* test_case_name,
- const char* name,
- const char* test_case_comment,
- const char* comment,
+TestInfo::TestInfo(const char* a_test_case_name,
+ const char* a_name,
+ const char* a_test_case_comment,
+ const char* a_comment,
internal::TypeId fixture_class_id,
internal::TestFactoryBase* factory) {
- impl_ = new internal::TestInfoImpl(this, test_case_name, name,
- test_case_comment, comment,
+ impl_ = new internal::TestInfoImpl(this, a_test_case_name, a_name,
+ a_test_case_comment, a_comment,
fixture_class_id, factory);
}
@@ -2368,11 +2368,11 @@ int TestCase::total_test_count() const {
// name: name of the test case
// set_up_tc: pointer to the function that sets up the test case
// tear_down_tc: pointer to the function that tears down the test case
-TestCase::TestCase(const char* name, const char* comment,
+TestCase::TestCase(const char* a_name, const char* a_comment,
Test::SetUpTestCaseFunc set_up_tc,
Test::TearDownTestCaseFunc tear_down_tc)
- : name_(name),
- comment_(comment),
+ : name_(a_name),
+ comment_(a_comment),
test_info_list_(new internal::Vector<TestInfo*>),
test_indices_(new internal::Vector<int>),
set_up_tc_(set_up_tc),
@@ -4022,8 +4022,9 @@ int UnitTestImpl::RunAllTests() {
// Runs the tests only if there was no fatal failure during global
// set-up.
if (!Test::HasFatalFailure()) {
- for (int i = 0; i < total_test_case_count(); i++) {
- GetMutableTestCase(i)->Run();
+ for (int test_index = 0; test_index < total_test_case_count();
+ test_index++) {
+ GetMutableTestCase(test_index)->Run();
}
}
@@ -4297,18 +4298,18 @@ void UnitTestImpl::UnshuffleTests() {
// TestInfoImpl constructor. The new instance assumes ownership of the test
// factory object.
TestInfoImpl::TestInfoImpl(TestInfo* parent,
- const char* test_case_name,
- const char* name,
- const char* test_case_comment,
- const char* comment,
- TypeId fixture_class_id,
+ const char* a_test_case_name,
+ const char* a_name,
+ const char* a_test_case_comment,
+ const char* a_comment,
+ TypeId a_fixture_class_id,
internal::TestFactoryBase* factory) :
parent_(parent),
- test_case_name_(String(test_case_name)),
- name_(String(name)),
- test_case_comment_(String(test_case_comment)),
- comment_(String(comment)),
- fixture_class_id_(fixture_class_id),
+ test_case_name_(String(a_test_case_name)),
+ name_(String(a_name)),
+ test_case_comment_(String(a_test_case_comment)),
+ comment_(String(a_comment)),
+ fixture_class_id_(a_fixture_class_id),
should_run_(false),
is_disabled_(false),
matches_filter_(false),