mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
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 🤷 Closes #2015
This commit is contained in:
@@ -371,7 +371,7 @@ Matchers.tests.cpp:<line number>: passed: with 1 message: 'std::is_same< decltyp
|
||||
Matchers.tests.cpp:<line number>: passed: 1, MatcherA() && MatcherB() for: 1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 )
|
||||
Matchers.tests.cpp:<line number>: passed: with 1 message: 'std::is_same< decltype(MatcherA() || !MatcherB()), Catch::Matchers::Detail::MatchAnyOfGeneric<MatcherA, Catch::Matchers::Detail::MatchNotOfGeneric<MatcherB>> >::value'
|
||||
Matchers.tests.cpp:<line number>: passed: 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (float) 1.0f or not equals: (long long) 1 )
|
||||
Matchers.tests.cpp:<line number>: passed: vec, Predicate<std::vector<int>>([](auto const& vec) { return std::all_of(vec.begin(), vec.end(), [](int elem) { return elem % 2 == 1; }); }, "All elements are odd") && !EqualsRange(a) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } )
|
||||
Matchers.tests.cpp:<line number>: passed: vec, 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") && !EqualsRange(a) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } )
|
||||
Matchers.tests.cpp:<line number>: passed: str, StartsWith("foo") && EqualsRange(arr) && EndsWith("bar") for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" )
|
||||
Matchers.tests.cpp:<line number>: passed: str, StartsWith("foo") && !EqualsRange(bad_arr) && EndsWith("bar") for: "foobar" ( starts with: "foo" and not Equals: { 'o', 'o', 'f', 'b', 'a', 'r' } and ends with: "bar" )
|
||||
Matchers.tests.cpp:<line number>: passed: str, EqualsRange(arr) && StartsWith("foo") && EndsWith("bar") for: "foobar" ( Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and starts with: "foo" and ends with: "bar" )
|
||||
@@ -1014,7 +1014,7 @@ Message.tests.cpp:<line number>: failed: explicitly with 1 message: 'Message fro
|
||||
Message.tests.cpp:<line number>: failed: explicitly with 1 message: 'Message from section two'
|
||||
Matchers.tests.cpp:<line number>: passed: (EvilMatcher(), EvilMatcher()), EvilCommaOperatorUsed
|
||||
Matchers.tests.cpp:<line number>: passed: &EvilMatcher(), EvilAddressOfOperatorUsed
|
||||
Matchers.tests.cpp:<line number>: passed: EvilMatcher() || EvilMatcher() && !EvilMatcher()
|
||||
Matchers.tests.cpp:<line number>: passed: EvilMatcher() || (EvilMatcher() && !EvilMatcher())
|
||||
Matchers.tests.cpp:<line number>: passed: (EvilMatcher() && EvilMatcher()) || !EvilMatcher()
|
||||
CmdLine.tests.cpp:<line number>: passed: spec.hasFilters() == false for: false == false
|
||||
CmdLine.tests.cpp:<line number>: passed: spec.matches( *tcA ) == false for: false == false
|
||||
|
@@ -3037,7 +3037,7 @@ Matchers.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( vec, Predicate<std::vector<int>>([](auto const& vec) { return std::all_of(vec.begin(), vec.end(), [](int elem) { return elem % 2 == 1; }); }, "All elements are odd") && !EqualsRange(a) )
|
||||
REQUIRE_THAT( vec, 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") && !EqualsRange(a) )
|
||||
with expansion:
|
||||
{ 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5,
|
||||
3, 1 } )
|
||||
@@ -7500,7 +7500,7 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THROWS_AS( &EvilMatcher(), EvilAddressOfOperatorUsed )
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_NOTHROW( EvilMatcher() || EvilMatcher() && !EvilMatcher() )
|
||||
REQUIRE_NOTHROW( EvilMatcher() || (EvilMatcher() && !EvilMatcher()) )
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_NOTHROW( (EvilMatcher() && EvilMatcher()) || !EvilMatcher() )
|
||||
|
@@ -741,7 +741,7 @@ ok {test-number} - with 1 message: 'std::is_same< decltype(MatcherA() || !Matche
|
||||
# Combining only templated matchers
|
||||
ok {test-number} - 1, MatcherA() || !MatcherB() for: 1 ( equals: (int) 1 or (float) 1.0f or not equals: (long long) 1 )
|
||||
# Combining templated and concrete matchers
|
||||
ok {test-number} - vec, Predicate<std::vector<int>>([](auto const& vec) { return std::all_of(vec.begin(), vec.end(), [](int elem) { return elem % 2 == 1; }); }, "All elements are odd") && !EqualsRange(a) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } )
|
||||
ok {test-number} - vec, 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") && !EqualsRange(a) for: { 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } )
|
||||
# Combining templated and concrete matchers
|
||||
ok {test-number} - str, StartsWith("foo") && EqualsRange(arr) && EndsWith("bar") for: "foobar" ( starts with: "foo" and Equals: { 'f', 'o', 'o', 'b', 'a', 'r' } and ends with: "bar" )
|
||||
# Combining templated and concrete matchers
|
||||
@@ -1951,7 +1951,7 @@ ok {test-number} - (EvilMatcher(), EvilMatcher()), EvilCommaOperatorUsed
|
||||
# Overloaded comma or address-of operators are not used
|
||||
ok {test-number} - &EvilMatcher(), EvilAddressOfOperatorUsed
|
||||
# Overloaded comma or address-of operators are not used
|
||||
ok {test-number} - EvilMatcher() || EvilMatcher() && !EvilMatcher()
|
||||
ok {test-number} - EvilMatcher() || (EvilMatcher() && !EvilMatcher())
|
||||
# Overloaded comma or address-of operators are not used
|
||||
ok {test-number} - (EvilMatcher() && EvilMatcher()) || !EvilMatcher()
|
||||
# Parse test names and tags
|
||||
|
@@ -3223,7 +3223,7 @@ Nor would this
|
||||
<TestCase name="Combining templated and concrete matchers" tags="[matchers][templated]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Original>
|
||||
vec, Predicate<std::vector<int>>([](auto const& vec) { return std::all_of(vec.begin(), vec.end(), [](int elem) { return elem % 2 == 1; }); }, "All elements are odd") && !EqualsRange(a)
|
||||
vec, 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") && !EqualsRange(a)
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ 1, 3, 5 } ( matches predicate: "All elements are odd" and not Equals: { 5, 3, 1 } )
|
||||
@@ -9042,10 +9042,10 @@ Nor would this
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Original>
|
||||
EvilMatcher() || EvilMatcher() && !EvilMatcher()
|
||||
EvilMatcher() || (EvilMatcher() && !EvilMatcher())
|
||||
</Original>
|
||||
<Expanded>
|
||||
EvilMatcher() || EvilMatcher() && !EvilMatcher()
|
||||
EvilMatcher() || (EvilMatcher() && !EvilMatcher())
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
|
Reference in New Issue
Block a user