mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Fix Wold-style-cast error (#2125)
* Add Wold-style-cast to cmake flags * Fix old style cast in catch_stats.hpp * Fix old style cast in catch_stats.cpp
This commit is contained in:

committed by
GitHub

parent
045feff834
commit
0acb371b92
@@ -79,7 +79,7 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
|
||||
SECTION( "Comparisons are deep" ) {
|
||||
char buffer1[] = "Hello";
|
||||
char buffer2[] = "Hello";
|
||||
CHECK((char*)buffer1 != (char*)buffer2);
|
||||
CHECK(reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2));
|
||||
|
||||
StringRef left(buffer1), right(buffer2);
|
||||
REQUIRE( left == right );
|
||||
|
@@ -41,7 +41,7 @@ TEST_CASE( "XmlEncode", "[XML]" ) {
|
||||
|
||||
// Thanks to Peter Bindels (dascandy) for some of the tests
|
||||
TEST_CASE("XmlEncode: UTF-8", "[XML][UTF-8][approvals]") {
|
||||
#define ESC(lit) (char*)(lit)
|
||||
#define ESC(lit) reinterpret_cast<const char*>(lit)
|
||||
SECTION("Valid utf-8 strings") {
|
||||
CHECK(encode(ESC(u8"Here be 👾")) == ESC(u8"Here be 👾"));
|
||||
CHECK(encode(ESC(u8"šš")) == ESC(u8"šš"));
|
||||
|
Reference in New Issue
Block a user