From 79c19c6a1c400b28f27ca6f44dd11e07ac43ec85 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 15 May 2021 22:18:00 +0300 Subject: switch from Boost.Nowide to winapi-utf8 --- test/CMakeLists.txt | 2 -- test/call_stack.cpp | 5 ++--- test/test_lib.cpp | 10 +++++----- test/unit_tests/CMakeLists.txt | 1 - test/unit_tests/paths.hpp | 7 ------- 5 files changed, 7 insertions(+), 18 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3b415a8..86f7d1a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,6 +1,5 @@ add_library(test_lib SHARED test_lib.cpp) target_link_libraries(test_lib PRIVATE pdb_repo) -target_link_libraries(test_lib PRIVATE Boost::nowide) target_include_directories(test_lib PUBLIC .) target_compile_definitions(test_lib PRIVATE TEST_LIB_EXPORTS) install(TARGETS test_lib RUNTIME DESTINATION bin/test) @@ -8,7 +7,6 @@ install_pdbs(TARGETS test_lib DESTINATION bin/test) add_executable(call_stack call_stack.cpp) target_link_libraries(call_stack PRIVATE test_lib) -target_link_libraries(call_stack PRIVATE Boost::nowide) install(TARGETS call_stack RUNTIME DESTINATION bin/test) install_pdbs(TARGETS call_stack DESTINATION bin/test) diff --git a/test/call_stack.cpp b/test/call_stack.cpp index b094aac..fb5f7b8 100644 --- a/test/call_stack.cpp +++ b/test/call_stack.cpp @@ -5,15 +5,14 @@ #include -#include - #include +#include int main() { try { test_ns::print_call_stack(); } catch (const std::exception& e) { - boost::nowide::cerr << e.what() << '\n'; + std::cerr << e.what() << '\n'; return 1; } return 0; diff --git a/test/test_lib.cpp b/test/test_lib.cpp index ee02ffb..0c4bd27 100644 --- a/test/test_lib.cpp +++ b/test/test_lib.cpp @@ -7,7 +7,7 @@ #include -#include +#include // Prevent frame pointer omission (FPO) and/or inlining. #ifdef _MSC_VER @@ -20,7 +20,7 @@ namespace { void do_print_call_stack() { const auto dbghelp = pdb::DbgHelp::current_process(); const auto call_stack = pdb::CallStack::capture(); - call_stack.dump(boost::nowide::cout, dbghelp); + call_stack.dump(std::cout, dbghelp); } void do_throw_call_stack() { @@ -32,17 +32,17 @@ void do_throw_call_stack() { volatile int var = 42; void baz(F f) { - boost::nowide::cout << "baz " << pdb::format_address(reinterpret_cast(&baz)) << '\n'; + std::cout << "baz " << pdb::format_address(reinterpret_cast(&baz)) << '\n'; f(); } void bar(F f) { - boost::nowide::cout << "bar " << pdb::format_address(reinterpret_cast(&bar)) << '\n'; + std::cout << "bar " << pdb::format_address(reinterpret_cast(&bar)) << '\n'; baz(f); } void foo(F f) { - boost::nowide::cout << "foo " << pdb::format_address(reinterpret_cast(&foo)) << '\n'; + std::cout << "foo " << pdb::format_address(reinterpret_cast(&foo)) << '\n'; bar(f); } diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index bfeab62..309333d 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -5,7 +5,6 @@ target_link_libraries(unit_tests PRIVATE pdb_repo test_lib) target_link_libraries(unit_tests PRIVATE Boost::disable_autolinking Boost::filesystem - Boost::nowide Boost::unit_test_framework) install(TARGETS unit_tests RUNTIME DESTINATION bin/test) install_pdbs(TARGETS unit_tests DESTINATION bin/test) diff --git a/test/unit_tests/paths.hpp b/test/unit_tests/paths.hpp index 3eb2fd6..afc15ec 100644 --- a/test/unit_tests/paths.hpp +++ b/test/unit_tests/paths.hpp @@ -6,22 +6,15 @@ #pragma once #include -#include #include using path = boost::filesystem::path; -class FixFilesystem { -public: - FixFilesystem() { boost::nowide::nowide_filesystem(); } -}; - class Paths { public: typedef boost::filesystem::path path; static Paths& get() { - static FixFilesystem fix_filesystem; static Paths instance; return instance; } -- cgit v1.2.3