From 9106d21e4be128937f31b98becae4eb0c0716f77 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 16 May 2021 22:50:45 +0300 Subject: test: echo is _not_ MSVC-only, all of a sudden --- test/CMakeLists.txt | 18 +++++++++--------- test/unit_tests/shared/fixed_size.hpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ed1ebab..396356d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,10 +1,10 @@ -# echo.cpp is MSVC-only, I think. -# TODO: fix that? -if(MSVC) - add_executable(echo echo.cpp) - set_target_properties(echo PROPERTIES OUTPUT_NAME winapi-common-test-echo) - install(TARGETS echo RUNTIME DESTINATION bin) - install_pdbs(TARGETS echo DESTINATION bin) - - add_subdirectory(unit_tests) +add_executable(echo echo.cpp) +set_target_properties(echo PROPERTIES OUTPUT_NAME winapi-common-test-echo) +install(TARGETS echo RUNTIME DESTINATION bin) +install_pdbs(TARGETS echo DESTINATION bin) +if(MINGW) + target_compile_options(echo PRIVATE -municode) + target_link_libraries(echo PRIVATE -municode) endif() + +add_subdirectory(unit_tests) diff --git a/test/unit_tests/shared/fixed_size.hpp b/test/unit_tests/shared/fixed_size.hpp index ba9a128..a796f56 100644 --- a/test/unit_tests/shared/fixed_size.hpp +++ b/test/unit_tests/shared/fixed_size.hpp @@ -36,7 +36,7 @@ public: std::string extract() const { // Lines are null-terminated, and don't store their lenghts, so... - return data(); + return this->data(); } }; @@ -66,7 +66,7 @@ struct StringList : public std::array, Length> { std::vector extract() const { std::vector dest; for (std::size_t i = 0; i < numof_lines; ++i) { - dest.emplace_back(at(i).extract()); + dest.emplace_back(this->at(i).extract()); } return dest; } -- cgit v1.2.3