MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / tests

Function tests

loader/tests/src/test_dump_mk_stack.cpp:43–62  ·  view source on GitHub ↗

<!-- description --> @brief Used to execute the actual checks. We put the checks in this function so that we can validate the tests both at compile-time and at run-time. If a bsl::ut_check fails, the tests will either fail fast at run-time, or will produce a compile-time error. <!-- inputs/outputs --> @return Always returns bsl::exit_success.

Source from the content-addressed store, hash-verified

41 /// @return Always returns bsl::exit_success.
42 ///
43 [[nodiscard]] constexpr auto
44 tests() noexcept -> bsl::exit_code
45 {
46 helpers::init();
47 constexpr auto func{&dump_mk_stack};
48
49 bsl::ut_scenario{"success"} = [&]() noexcept {
50 bsl::ut_given{} = [&]() noexcept {
51 span_t const stack{};
52 bsl::ut_then{} = [&]() noexcept {
53 func(&stack, {});
54 };
55 bsl::ut_cleanup{} = [&]() noexcept {
56 helpers::reset();
57 };
58 };
59 };
60
61 return helpers::fini();
62 }
63}
64
65/// <!-- description -->

Callers 1

mainFunction · 0.70

Calls 3

initFunction · 0.85
resetFunction · 0.85
finiFunction · 0.85

Tested by

no test coverage detected