<!-- 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.
| 68 | /// @return Always returns bsl::exit_success. |
| 69 | /// |
| 70 | [[nodiscard]] constexpr auto |
| 71 | tests() noexcept -> bsl::exit_code |
| 72 | { |
| 73 | constexpr auto enabled{bsl::safe_u64::magic_1()}; |
| 74 | constexpr auto disabled{bsl::safe_u64::magic_0()}; |
| 75 | |
| 76 | bsl::ut_scenario{"initialize allocate fails"} = [&]() noexcept { |
| 77 | bsl::ut_given_at_runtime{} = [&]() noexcept { |
| 78 | root_page_table_t mut_rpt{}; |
| 79 | tls_t mut_tls{}; |
| 80 | page_pool_t mut_page_pool{}; |
| 81 | constexpr auto phys{0x1000_u64}; |
| 82 | bsl::ut_when{} = [&]() noexcept { |
| 83 | mut_page_pool.set_allocate<helpers::l3t_t>(nullptr, phys); |
| 84 | bsl::ut_then{} = [&]() noexcept { |
| 85 | bsl::ut_check(!mut_rpt.initialize(mut_tls, mut_page_pool)); |
| 86 | }; |
| 87 | }; |
| 88 | }; |
| 89 | }; |
| 90 |
no test coverage detected