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

Function tests

loader/tests/src/test_serial_write.cpp:42–60  ·  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

40 /// @return Always returns bsl::exit_success.
41 ///
42 [[nodiscard]] constexpr auto
43 tests() noexcept -> bsl::exit_code
44 {
45 helpers::init();
46 constexpr auto func{&serial_write};
47
48 bsl::ut_scenario{"success"} = [&]() noexcept {
49 bsl::ut_given{} = [&]() noexcept {
50 bsl::ut_then{} = [&]() noexcept {
51 func("the cow is blue for this is true");
52 };
53 bsl::ut_cleanup{} = [&]() noexcept {
54 helpers::reset();
55 };
56 };
57 };
58
59 return helpers::fini();
60 }
61}
62
63/// <!-- description -->

Callers 1

mainFunction · 0.70

Calls 3

initFunction · 0.85
resetFunction · 0.85
finiFunction · 0.85

Tested by

no test coverage detected