mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-17 10:25:39 +02:00
Stop accepting non-const comparison operators
A) non-const comparison operators should not exist and should not be encouraged B) The logic breaks comparing function pointers certain way C) It was inconsistent anyway, as it only applied to `==` and `!=` Closes #925
This commit is contained in:
@@ -169,6 +169,17 @@
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="#925: comparing function pointer to function address failed to compile" filename="projects/<exe-name>/TrickyTests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TrickyTests.cpp" >
|
||||
<Original>
|
||||
utility::synchronizing_callback != test.testMethod_uponComplete_arg
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 != 0
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="#961 -- Dynamically created sections should all be reported" tags="[.]" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||
<Section name="Looped section 0" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||
<OverallResults successes="1" failures="0" expectedFailures="0"/>
|
||||
@@ -1336,17 +1347,6 @@
|
||||
</Exception>
|
||||
<OverallResult success="false"/>
|
||||
</TestCase>
|
||||
<TestCase name="Demonstrate that a non-const == is not used" tags="[Tricky]" filename="projects/<exe-name>/TrickyTests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/TrickyTests.cpp" >
|
||||
<Original>
|
||||
t == 1u
|
||||
</Original>
|
||||
<Expanded>
|
||||
{?} == 1
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="EndsWith string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
|
Reference in New Issue
Block a user