41 #pragma clang diagnostic ignored "-Wunused-member-function" 42 #pragma clang diagnostic ignored "-Wunneeded-member-function" 43 #pragma clang diagnostic ignored "-Wunneeded-internal-declaration" 44 #pragma clang diagnostic ignored "-Wmissing-braces" 45 #pragma clang diagnostic ignored "-Wglobal-constructors" 46 #pragma clang diagnostic ignored "-Wexit-time-destructors" 82 explicit constexpr
ut_scenario(string_view
const &name) noexcept
96 template<
typename FUNC>
124 template<
typename FUNC>
125 [[maybe_unused]] constexpr
ut_given &
150 template<
typename FUNC>
151 [[maybe_unused]] constexpr
ut_when &
176 template<
typename FUNC>
177 [[maybe_unused]] constexpr
ut_then &
219 [[maybe_unused]] constexpr
bool constexpr cstr_type reset_color
resets the color output of debug statements
Definition: color.hpp:36
constexpr ut_when & operator=(FUNC &&func) noexcept
Executes a lambda function as the body of the "when" portion of the scenario.
Definition: ut.hpp:152
constexpr out< details::out_type_print > print() noexcept
Returns and instance of bsl::out<T>. This version of bsl::out<T> does not print a label and does not ...
Definition: debug.hpp:72
constexpr ut_scenario & operator=(FUNC &&func) noexcept
Executes a lambda function as the body of the scenario.
Definition: ut.hpp:98
void ut_check_failed() noexcept
This is a non-constexpr function that can be used to detect when a unit test check fails....
Definition: ut.hpp:205
constexpr bsl::exit_code ut_success() noexcept
Outputs a message and returns bsl::exit_success.
Definition: ut.hpp:192
constexpr void discard(ARGS &&... args) noexcept
This function discards a parameter that it is given. This is the same as executing a static cast....
Definition: discard.hpp:58
constexpr cstr_type magenta
changes the foreground color to normal magenta
Definition: color.hpp:49
constexpr bsl::char_type endl
newline constant
Definition: debug.hpp:53
void ut_print_here(sloc_type const &sloc) noexcept
Prints the current source location to the console.
Definition: ut.hpp:59
constexpr bool ut_check(bool const test, sloc_type const &sloc=here()) noexcept
Checks to see if "test" is true. If test is false, this function will exit fast with a failure code.
Definition: ut.hpp:220
Defines a unit test scenario. A scenario defines a user story, describing the "scenario" being tested...
Definition: ut.hpp:73
Defines the initial state of a unit test scenario including the creation of any objects that might pa...
Definition: ut.hpp:112
This class implements the source_location specification that will eventually be included in C++20....
Definition: source_location.hpp:47
constexpr source_location here(source_location const &sloc=source_location::current()) noexcept
This provides a less verbose version of bsl::source_location::current() to help reduce how large this...
Definition: source_location.hpp:185
Defines the expected "result" of a unit test scenario.
Definition: ut.hpp:164
Defines the "action" of a unit test scenario.
Definition: ut.hpp:138
constexpr ut_scenario(string_view const &name) noexcept
Constructs a scenario.
Definition: ut.hpp:82
bsl::int32 exit_code
defines the exit code type
Definition: exit_code.hpp:36
constexpr cstr_type green
changes the foreground color to normal green
Definition: color.hpp:43
constexpr exit_code exit_success
represents a successful exit
Definition: exit_code.hpp:39
constexpr ut_given & operator=(FUNC &&func) noexcept
Executes a lambda function as the body of the "given" portion of the scenario.
Definition: ut.hpp:126
constexpr out< details::out_type_error > error() noexcept
Returns and instance of bsl::out<T>. This version of bsl::out<T> prints "ERROR: " when created and do...
Definition: debug.hpp:128
constexpr ut_then & operator=(FUNC &&func) noexcept
Executes a lambda function as the body of the "then" portion of the scenario.
Definition: ut.hpp:178