aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-29 01:33:39 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-29 01:34:04 +0300
commitbc78e3308f8bf74a8935f9ef8fd28825d6b48c2f (patch)
treee496012c405316287ef67ebcfecf5f40d4a9a656 /test
parentrename class Repo to PostMortem (diff)
downloadwinapi-debug-bc78e3308f8bf74a8935f9ef8fd28825d6b48c2f.tar.gz
winapi-debug-bc78e3308f8bf74a8935f9ef8fd28825d6b48c2f.zip
move _address functions to winapi::address
Diffstat (limited to '')
-rw-r--r--test/test_lib.cpp6
-rw-r--r--test/unit_tests/call_stack.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/test/test_lib.cpp b/test/test_lib.cpp
index bdb7bbf..caecc8b 100644
--- a/test/test_lib.cpp
+++ b/test/test_lib.cpp
@@ -32,17 +32,17 @@ void do_throw_call_stack() {
volatile int var = 42;
void baz(F f) {
- std::cout << "baz " << winapi::format_address(reinterpret_cast<void*>(&baz)) << '\n';
+ std::cout << "baz " << winapi::address::format(reinterpret_cast<void*>(&baz)) << '\n';
f();
}
void bar(F f) {
- std::cout << "bar " << winapi::format_address(reinterpret_cast<void*>(&bar)) << '\n';
+ std::cout << "bar " << winapi::address::format(reinterpret_cast<void*>(&bar)) << '\n';
baz(f);
}
void foo(F f) {
- std::cout << "foo " << winapi::format_address(reinterpret_cast<void*>(&foo)) << '\n';
+ std::cout << "foo " << winapi::address::format(reinterpret_cast<void*>(&foo)) << '\n';
bar(f);
}
diff --git a/test/unit_tests/call_stack.cpp b/test/unit_tests/call_stack.cpp
index 2f022c6..039e8f9 100644
--- a/test/unit_tests/call_stack.cpp
+++ b/test/unit_tests/call_stack.cpp
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(call_stack) {
BOOST_TEST_MESSAGE("Call stack:");
for (const auto& addr : call_stack) {
pretty.emplace_back(call_stack.pretty_print_address(dbghelp, addr));
- BOOST_TEST_MESSAGE('\t' << winapi::format_address(addr) << ' ' << pretty.back());
+ BOOST_TEST_MESSAGE('\t' << winapi::address::format(addr) << ' ' << pretty.back());
}
// Second, resolve the symbols:
@@ -43,12 +43,12 @@ BOOST_AUTO_TEST_CASE(call_stack) {
for (const auto& addr : call_stack) {
try {
auto symbol = dbghelp.resolve_symbol(addr);
- BOOST_TEST_MESSAGE('\t' << winapi::format_address(symbol.get_offline_address())
+ BOOST_TEST_MESSAGE('\t' << winapi::address::format(symbol.get_offline_address())
<< ' ' << symbol.get_name());
symbols.emplace_back(std::move(symbol));
} catch (const std::system_error& e) {
symbols.emplace_back(boost::none);
- BOOST_TEST_MESSAGE('\t' << winapi::format_address(addr)
+ BOOST_TEST_MESSAGE('\t' << winapi::address::format(addr)
<< " Couldn't resolve symbol: " << e.what());
}
}
@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(call_stack) {
};
for (const auto& addr : expected) {
BOOST_TEST(check(addr),
- "Function frame captured: " << winapi::format_address(addr));
+ "Function frame captured: " << winapi::address::format(addr));
}
}