mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-05 14:39:32 +01:00
Make warnings in assertions fire for GCC/Clang again
The old code caused warnings to fire under MSVC, and Clang <3.8.
I could not find a GCC version where it worked, but I assume that it
did at some point.
This new code causes all of MSVC, GCC, Clang, in current versions,
to emit signed/unsigned comparison warning in test like this:
```cpp
TEST_CASE() {
int32_t i = -1;
uint32_t j = 1;
REQUIRE(i != j);
}
```
Where previously only MSVC would emit the warning.
Fixes #1880
This commit is contained in:
@@ -300,7 +300,7 @@ TEST_CASE("analyse", "[approvals][benchmark]") {
|
||||
CHECK(analysis.outliers.low_severe == 0);
|
||||
CHECK(analysis.outliers.high_mild == 0);
|
||||
CHECK(analysis.outliers.high_severe == 0);
|
||||
CHECK(analysis.outliers.samples_seen == samples.size());
|
||||
CHECK(analysis.outliers.samples_seen == static_cast<int>(samples.size()));
|
||||
|
||||
CHECK(analysis.outlier_variance < 0.5);
|
||||
CHECK(analysis.outlier_variance > 0);
|
||||
|
||||
Reference in New Issue
Block a user