kaycxx-test
C++ unit test framework
Loading...
Searching...
No Matches
before_each.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Klaus Reimer <k@ailis.de>
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
11#include <source_location>
12
14#include <kaycxx/test/hook.hpp>
15
16namespace kaycxx::test {
17
26void before_each(callback body, std::source_location location = std::source_location::current());
27
33void before_each(hook value);
34
35} // namespace kaycxx::test
Defines the callback type used by the test framework.
Registered setup or teardown hook.
Definition hook.hpp:25
Defines registered test hooks.
Unit test framework functions and types.
Definition test.hpp:15
std::move_only_function< void()> callback
Callable block used by tests, suites, and hooks.
Definition callback.hpp:20
void before_each(callback body, std::source_location location=std::source_location::current())
Registers a hook that runs before each test in the current suite and its child suites.