mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-17 18:35:40 +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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user