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:
Martin Hořeňovský
2017-09-06 14:42:44 +02:00
parent aef2e4d9e7
commit b000411434
6 changed files with 56 additions and 58 deletions

View File

@@ -27,6 +27,7 @@ MiscTests.cpp:<line number>
</failure>
</testcase>
<testcase classname="<exe-name>.global" name="#872" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#925: comparing function pointer to function address failed to compile" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 0" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 1" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#961 -- Dynamically created sections should all be reported/Looped section 2" time="{duration}"/>
@@ -143,7 +144,6 @@ custom std exception
ExceptionTests.cpp:<line number>
</error>
</testcase>
<testcase classname="<exe-name>.global" name="Demonstrate that a non-const == is not used" time="{duration}"/>
<testcase classname="<exe-name>.global" name="EndsWith string matcher" time="{duration}">
<failure message="&quot;this string contains 'abc' as a substring&quot; ends with: &quot;this&quot;" type="CHECK_THAT">
MatchersTests.cpp:<line number>