aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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;