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

@@ -156,6 +156,18 @@ with expansion:
with message:
dummy := 0
-------------------------------------------------------------------------------
#925: comparing function pointer to function address failed to compile
-------------------------------------------------------------------------------
TrickyTests.cpp:<line number>
...............................................................................
TrickyTests.cpp:<line number>:
PASSED:
REQUIRE( utility::synchronizing_callback != test.testMethod_uponComplete_arg )
with expansion:
1 != 0
-------------------------------------------------------------------------------
#961 -- Dynamically created sections should all be reported
Looped section 0
@@ -237,6 +249,6 @@ ConditionTests.cpp:<line number>: FAILED:
CHECK_FALSE( true )
===============================================================================
test cases: 9 | 6 passed | 1 failed | 2 failed as expected
assertions: 26 | 19 passed | 4 failed | 3 failed as expected
test cases: 10 | 7 passed | 1 failed | 2 failed as expected
assertions: 27 | 20 passed | 4 failed | 3 failed as expected