mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
Add Wfloat-equal to default-enabled warnings
This is kinda messy, because there is no good way to signal to the compiler that some code uses direct comparison of floating point numbers intentionally, so instead we have to use diagnostic pragmas. We also have to over-suppress the test files, because Clang (and possibly GCC) still issue warnings from template instantiation even if the instantion site is under warning suppression, so the template definition has to be under warning suppression as well. Closes #2406
This commit is contained in:
@@ -3374,7 +3374,7 @@ C
|
||||
1, ( MatcherA() && MatcherB() ) && MatcherC()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 and equals: (T) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3382,7 +3382,7 @@ C
|
||||
1, MatcherA() && ( MatcherB() && MatcherC() )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 and equals: (T) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3390,7 +3390,7 @@ C
|
||||
1, ( MatcherA() && MatcherB() ) && ( MatcherC() && MatcherD() )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 and equals: (T) 1 and equals: true )
|
||||
1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 and equals: (T) 1 and equals: true )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -3401,7 +3401,7 @@ C
|
||||
1, ( MatcherA() || MatcherB() ) || MatcherC()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f or equals: (long long) 1 or equals: (T) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3409,7 +3409,7 @@ C
|
||||
1, MatcherA() || ( MatcherB() || MatcherC() )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f or equals: (long long) 1 or equals: (T) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3417,7 +3417,7 @@ C
|
||||
1, ( MatcherA() || MatcherB() ) || ( MatcherC() || MatcherD() )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f or equals: (long long) 1 or equals: (T) 1 or equals: true )
|
||||
1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 or equals: (T) 1 or equals: true )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -3428,7 +3428,7 @@ C
|
||||
0, !MatcherA()
|
||||
</Original>
|
||||
<Expanded>
|
||||
0 not equals: (int) 1 or (float) 1.0f
|
||||
0 not equals: (int) 1 or (string) "1"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3436,7 +3436,7 @@ C
|
||||
1, !!MatcherA()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 equals: (int) 1 or (float) 1.0f
|
||||
1 equals: (int) 1 or (string) "1"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3444,7 +3444,7 @@ C
|
||||
0, !!!MatcherA()
|
||||
</Original>
|
||||
<Expanded>
|
||||
0 not equals: (int) 1 or (float) 1.0f
|
||||
0 not equals: (int) 1 or (string) "1"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3452,7 +3452,7 @@ C
|
||||
1, !!!!MatcherA()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 equals: (int) 1 or (float) 1.0f
|
||||
1 equals: (int) 1 or (string) "1"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -3466,7 +3466,7 @@ C
|
||||
1, MatcherA() || MatcherB()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f or equals: (long long) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" or equals: (long long) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3474,7 +3474,7 @@ C
|
||||
1, MatcherA() && MatcherB()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f and equals: (long long) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" and equals: (long long) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
@@ -3482,7 +3482,7 @@ C
|
||||
1, MatcherA() || !MatcherB()
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 ( equals: (int) 1 or (float) 1.0f or not equals: (long long) 1 )
|
||||
1 ( equals: (int) 1 or (string) "1" or not equals: (long long) 1 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
|
Reference in New Issue
Block a user