diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 989d623b..76b73fdf 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -132,6 +132,9 @@ endif() if( MSVC ) target_compile_options( ${TESTS_TARGET} PRIVATE /utf-8 ) target_compile_options( ${TESTS_TARGET_PUBLIC} PRIVATE /utf-8 ) + + target_compile_definitions( ${TESTS_TARGET} PRIVATE _CRT_INTERNAL_NONSTDC_NAMES=1 ) + target_compile_definitions( ${TESTS_TARGET_PUBLIC} PRIVATE _CRT_INTERNAL_NONSTDC_NAMES=1 ) else() target_compile_options( ${TESTS_TARGET} PRIVATE -Wno-deprecated -Wno-deprecated-declarations ) target_compile_options( ${TESTS_TARGET_PUBLIC} PRIVATE -Wno-deprecated -Wno-deprecated-declarations ) diff --git a/tests/src/test_bitarchivereader.cpp b/tests/src/test_bitarchivereader.cpp index f380d709..f428093f 100644 --- a/tests/src/test_bitarchivereader.cpp +++ b/tests/src/test_bitarchivereader.cpp @@ -32,11 +32,6 @@ #include #include -// Needed by MSVC for defining the S_XXXX macros. -#ifndef _CRT_INTERNAL_NONSTDC_NAMES // NOLINT(*-reserved-identifier, *-dcl37-c) -#define _CRT_INTERNAL_NONSTDC_NAMES 1 -#endif - // For checking posix file attributes. #include @@ -910,7 +905,7 @@ TEMPLATE_TEST_CASE( "BitArchiveReader: Reading an archive with a Unicode file na const fs::path arcFileName{ BIT7Z_NATIVE_STRING( "αρχείο.7z" ) }; TestType inputArchive{}; - getInputArchive( arcFileName, inputArchive ); + getInputArchive( arcFileName, inputArchive ); const BitArchiveReader info( test::sevenzip_lib(), inputArchive, BitFormat::SevenZip ); REQUIRE_ITEM_TYPE( info, "¡Porque sí!.doc", fs::file_type::regular ); REQUIRE_ITEM_TYPE( info, "σύννεφα.jpg", fs::file_type::regular );