-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsynopsis.hpp
More file actions
33 lines (23 loc) · 1 KB
/
synopsis.hpp
File metadata and controls
33 lines (23 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "testing_v1/private.hpp"
// test.hpp ====================================================================
/// A minimalist test framework.
namespace testing_v1 {
/// Holds a registered test action and should only be used at namespace scope.
template <class Action> struct test_t : Private::test_t<Action> {
/// Constructs a test from the given action.
template <class ForwardableAction> test_t(ForwardableAction &&action);
/// Tests are not CopyConstructible.
test_t(const test_t &) = delete;
/// Tests are not CopyAssignable.
test_t &operator=(const test_t &) = delete;
};
/// Creates and registers a test action and should only be used at namespace
/// scope.
template <class Action> test_t<std::decay_t<Action>> test(Action &&action);
/// Prints `FAIL` and `exit(1)`s the program if the result is false.
void verify(bool result);
} // namespace testing_v1
/// Runs all registered test actions. Usually there should only be a single
/// test action per test program.
int main();