Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/Matchers.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-09-06 13:10:43 +0200
committerMartin Hořeňovský2020-09-06 13:11:42 +0200
commitcc18bd719da38e5415909f5b10199395f00076e6 (patch)
tree973427bffc72f3b2fbed258a1c2629c906f951f3 /tests/SelfTest/UsageTests/Matchers.tests.cpp
parent90aeffb97d6942d16f75a56b11e10fc0b010995a (diff)
downloadcatch3-cc18bd719da38e5415909f5b10199395f00076e6.tar.gz
Sweep out Wshadow
Most of the changes are completely pointless renaming of constructor arguments so that they do not use the same name as the type members, but :shrug: Closes #2015
Diffstat (limited to 'tests/SelfTest/UsageTests/Matchers.tests.cpp')
-rw-r--r--tests/SelfTest/UsageTests/Matchers.tests.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/SelfTest/UsageTests/Matchers.tests.cpp b/tests/SelfTest/UsageTests/Matchers.tests.cpp
index b627d4a9..b4621d86 100644
--- a/tests/SelfTest/UsageTests/Matchers.tests.cpp
+++ b/tests/SelfTest/UsageTests/Matchers.tests.cpp
@@ -711,22 +711,22 @@ namespace { namespace MatchersTests {
template<typename Range>
struct EqualsRangeMatcher : Catch::Matchers::MatcherGenericBase {
- EqualsRangeMatcher(Range const& range) : range{ range } {}
+ EqualsRangeMatcher(Range const& range) : m_range{ range } {}
template<typename OtherRange>
bool match(OtherRange const& other) const {
using std::begin;
using std::end;
- return std::equal(begin(range), end(range), begin(other), end(other));
+ return std::equal(begin(m_range), end(m_range), begin(other), end(other));
}
std::string describe() const override {
- return "Equals: " + Catch::rangeToString(range);
+ return "Equals: " + Catch::rangeToString(m_range);
}
private:
- Range const& range;
+ Range const& m_range;
};
template<typename Range>
@@ -750,8 +750,8 @@ namespace { namespace MatchersTests {
std::array<int, 3> a{{ 5, 3, 1 }};
REQUIRE_THAT(vec,
- Predicate<std::vector<int>>([](auto const& vec) {
- return std::all_of(vec.begin(), vec.end(), [](int elem) {
+ Predicate<std::vector<int>>([](auto const& v) {
+ return std::all_of(v.begin(), v.end(), [](int elem) {
return elem % 2 == 1;
});
}, "All elements are odd") &&
@@ -948,7 +948,7 @@ namespace { namespace MatchersTests {
TEST_CASE("Overloaded comma or address-of operators are not used", "[matchers][templated]") {
REQUIRE_THROWS_AS((EvilMatcher(), EvilMatcher()), EvilCommaOperatorUsed);
REQUIRE_THROWS_AS(&EvilMatcher(), EvilAddressOfOperatorUsed);
- REQUIRE_NOTHROW(EvilMatcher() || EvilMatcher() && !EvilMatcher());
+ REQUIRE_NOTHROW(EvilMatcher() || (EvilMatcher() && !EvilMatcher()));
REQUIRE_NOTHROW((EvilMatcher() && EvilMatcher()) || !EvilMatcher());
}