summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 19:54:05 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 19:54:05 (GMT)
commitd56773b492b7b675d5c547baab815289a7815bdd (patch)
tree59322de2099c9879b4a10a298ecf6e6b03a63ace /test
parent3508784108a38d673a0c7d14c897e7a51b2a7e36 (diff)
downloadgoogletest-d56773b492b7b675d5c547baab815289a7815bdd.zip
googletest-d56773b492b7b675d5c547baab815289a7815bdd.tar.gz
googletest-d56773b492b7b675d5c547baab815289a7815bdd.tar.bz2
Turns on -Wshadow (by Preston Jackson).
Diffstat (limited to 'test')
-rw-r--r--test/gtest-param-test_test.cc4
-rw-r--r--test/gtest_unittest.cc10
-rw-r--r--test/production.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/test/gtest-param-test_test.cc b/test/gtest-param-test_test.cc
index ecb5fdb..e718ffb 100644
--- a/test/gtest-param-test_test.cc
+++ b/test/gtest-param-test_test.cc
@@ -205,7 +205,7 @@ TEST(RangeTest, IntRangeWithCustomStepOverUpperBound) {
// copy constructor, operator=(), operator+(), and operator<().
class DogAdder {
public:
- explicit DogAdder(const char* value) : value_(value) {}
+ explicit DogAdder(const char* a_value) : value_(a_value) {}
DogAdder(const DogAdder& other) : value_(other.value_.c_str()) {}
DogAdder operator=(const DogAdder& other) {
@@ -243,7 +243,7 @@ TEST(RangeTest, WorksWithACustomType) {
class IntWrapper {
public:
- explicit IntWrapper(int value) : value_(value) {}
+ explicit IntWrapper(int a_value) : value_(a_value) {}
IntWrapper(const IntWrapper& other) : value_(other.value_) {}
IntWrapper operator=(const IntWrapper& other) {
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index bf41de7..5e79c5a 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -4009,7 +4009,7 @@ TEST(AssertionTest, NonFixtureSubroutine) {
// An uncopyable class.
class Uncopyable {
public:
- explicit Uncopyable(int value) : value_(value) {}
+ explicit Uncopyable(int a_value) : value_(a_value) {}
int value() const { return value_; }
bool operator==(const Uncopyable& rhs) const {
@@ -5095,7 +5095,7 @@ TEST(AssertionResultTest, StreamingWorks) {
// both in the global namespace.
class Base {
public:
- explicit Base(int x) : x_(x) {}
+ explicit Base(int an_x) : x_(an_x) {}
int x() const { return x_; }
private:
int x_;
@@ -5122,7 +5122,7 @@ TEST(MessageTest, CanStreamUserTypeInGlobalNameSpace) {
namespace {
class MyTypeInUnnamedNameSpace : public Base {
public:
- explicit MyTypeInUnnamedNameSpace(int x): Base(x) {}
+ explicit MyTypeInUnnamedNameSpace(int an_x): Base(an_x) {}
};
std::ostream& operator<<(std::ostream& os,
const MyTypeInUnnamedNameSpace& val) {
@@ -5147,7 +5147,7 @@ TEST(MessageTest, CanStreamUserTypeInUnnamedNameSpace) {
namespace namespace1 {
class MyTypeInNameSpace1 : public Base {
public:
- explicit MyTypeInNameSpace1(int x): Base(x) {}
+ explicit MyTypeInNameSpace1(int an_x): Base(an_x) {}
};
std::ostream& operator<<(std::ostream& os,
const MyTypeInNameSpace1& val) {
@@ -5172,7 +5172,7 @@ TEST(MessageTest, CanStreamUserTypeInUserNameSpace) {
namespace namespace2 {
class MyTypeInNameSpace2 : public ::Base {
public:
- explicit MyTypeInNameSpace2(int x): Base(x) {}
+ explicit MyTypeInNameSpace2(int an_x): Base(an_x) {}
};
} // namespace namespace2
std::ostream& operator<<(std::ostream& os,
diff --git a/test/production.h b/test/production.h
index 59970da..8f16fff 100644
--- a/test/production.h
+++ b/test/production.h
@@ -48,7 +48,7 @@ class PrivateCode {
int x() const { return x_; }
private:
- void set_x(int x) { x_ = x; }
+ void set_x(int an_x) { x_ = an_x; }
int x_;
};