aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-13 19:26:04 +0200
committerEgor Tensin <egor@tensin.name>2026-06-13 19:26:04 +0200
commit9991c3526cd0d4a773e17064327fd41fd091129d (patch)
tree36567562f8be540fb1bfbf8fb8d102a72a5eccf2 /test
parentupgrade winapi-common (diff)
downloadwinapi-debug-9991c3526cd0d4a773e17064327fd41fd091129d.tar.gz
winapi-debug-9991c3526cd0d4a773e17064327fd41fd091129d.zip
finally, perfect .clang-format settings?
Diffstat (limited to '')
-rw-r--r--test/unit_tests/call_stack.cpp17
-rw-r--r--test/unit_tests/fixtures.hpp13
2 files changed, 19 insertions, 11 deletions
diff --git a/test/unit_tests/call_stack.cpp b/test/unit_tests/call_stack.cpp
index 84cfc2a..05557bd 100644
--- a/test/unit_tests/call_stack.cpp
+++ b/test/unit_tests/call_stack.cpp
@@ -43,13 +43,17 @@ BOOST_AUTO_TEST_CASE(call_stack) {
for (const auto& addr : call_stack) {
try {
auto symbol = dbghelp.resolve_symbol(addr);
- BOOST_TEST_MESSAGE('\t' << winapi::address::format(symbol.get_offline_address())
- << ' ' << symbol.get_name());
+ 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(std::nullopt);
- BOOST_TEST_MESSAGE('\t' << winapi::address::format(addr)
- << " Couldn't resolve symbol: " << e.what());
+ BOOST_TEST_MESSAGE(
+ '\t' << winapi::address::format(addr)
+ << " Couldn't resolve symbol: " << e.what()
+ );
}
}
@@ -64,8 +68,9 @@ BOOST_AUTO_TEST_CASE(call_stack) {
return false;
};
for (const auto& addr : expected) {
- BOOST_TEST(check(addr),
- "Function frame captured: " << winapi::address::format(addr));
+ BOOST_TEST(
+ check(addr), "Function frame captured: " << winapi::address::format(addr)
+ );
}
}
diff --git a/test/unit_tests/fixtures.hpp b/test/unit_tests/fixtures.hpp
index 8233f95..0c24b37 100644
--- a/test/unit_tests/fixtures.hpp
+++ b/test/unit_tests/fixtures.hpp
@@ -51,9 +51,11 @@ public:
using AddressList = Set<winapi::Address>;
static AddressList expected_function_addresses() {
- return cast({reinterpret_cast<void*>(&test_ns::foo),
- reinterpret_cast<void*>(&test_ns::bar),
- reinterpret_cast<void*>(&test_ns::baz)});
+ return cast(
+ {reinterpret_cast<void*>(&test_ns::foo),
+ reinterpret_cast<void*>(&test_ns::bar),
+ reinterpret_cast<void*>(&test_ns::baz)}
+ );
}
static SymbolList expected_functions() {
@@ -128,8 +130,9 @@ private:
// That's pretty ad-hoc, but seems to work; based on
// https://www.boost.org/doc/libs/1_70_0/libs/test/doc/html/boost_test/runtime_config/custom_command_line_arguments.html
BOOST_TEST_REQUIRE(boost::unit_test::framework::master_test_suite().argc == 3);
- BOOST_TEST_REQUIRE(boost::unit_test::framework::master_test_suite().argv[1] ==
- "--test_lib_pdb");
+ BOOST_TEST_REQUIRE(
+ boost::unit_test::framework::master_test_suite().argv[1] == "--test_lib_pdb"
+ );
return boost::unit_test::framework::master_test_suite().argv[2];
}
};