diff options
| author | Roman Proskuryakov | 2020-12-28 16:00:19 +0300 |
|---|---|---|
| committer | GitHub | 2020-12-28 14:00:19 +0100 |
| commit | 0acb371b9200140ed958d60b86cbb95663ee93bd (patch) | |
| tree | c9fa1dee89d94b846485ee5d082ee9f4478a90ab /tests/SelfTest/IntrospectiveTests | |
| parent | 045feff834dbdc4af85bc5423416e294aa4a1e88 (diff) | |
| download | catch3-0acb371b9200140ed958d60b86cbb95663ee93bd.tar.gz | |
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
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/String.tests.cpp | 2 | ||||
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/Xml.tests.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/String.tests.cpp b/tests/SelfTest/IntrospectiveTests/String.tests.cpp index 3832a2bf..dbc8190b 100644 --- a/tests/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/String.tests.cpp @@ -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 ); diff --git a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp index 74f42383..2d375a22 100644 --- a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp @@ -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"šš")); |