aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-24 01:34:52 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-24 02:06:22 +0300
commitc073ed8f702e98ec56ed05e0c02167e355e6ee31 (patch)
treef726a5830ed4f47724ac6c447571398ef5b12ea2 /test
parentadd Process class (diff)
downloadwinapi-debug-c073ed8f702e98ec56ed05e0c02167e355e6ee31.tar.gz
winapi-debug-c073ed8f702e98ec56ed05e0c02167e355e6ee31.zip
switch to Boost.Nowide everywhere
Diffstat (limited to '')
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/call_stack.cpp13
2 files changed, 8 insertions, 6 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4574211..ac3e8b3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,5 +1,6 @@
add_executable(call_stack call_stack.cpp)
target_link_libraries(call_stack PRIVATE pdb_repo)
+target_link_libraries(call_stack PRIVATE Boost::nowide)
install(TARGETS call_stack RUNTIME DESTINATION bin)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
diff --git a/test/call_stack.cpp b/test/call_stack.cpp
index 1f6ce37..8eb3198 100644
--- a/test/call_stack.cpp
+++ b/test/call_stack.cpp
@@ -1,28 +1,29 @@
#include "pdb/all.hpp"
+#include <boost/nowide/iostream.hpp>
+
#include <exception>
-#include <iostream>
namespace test {
void call_stack() {
const auto dbghelp = pdb::DbgHelp::current_process();
const auto call_stack = pdb::CallStack::capture();
- call_stack.dump(std::cout, dbghelp);
+ call_stack.dump(boost::nowide::cout, dbghelp);
}
void __declspec(noinline) baz() {
- std::cout << "baz\n";
+ boost::nowide::cout << "baz\n";
call_stack();
}
void __declspec(noinline) bar() {
- std::cout << "bar\n";
+ boost::nowide::cout << "bar\n";
baz();
}
void __declspec(noinline) foo() {
- std::cout << "foo\n";
+ boost::nowide::cout << "foo\n";
bar();
}
@@ -32,7 +33,7 @@ int main() {
try {
test::foo();
} catch (const std::exception& e) {
- std::cerr << e.what() << '\n';
+ boost::nowide::cerr << e.what() << '\n';
return 1;
}
return 0;