C++ Utilities 5.27.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
The StandardOutputCheck class asserts whether the (standard) output written in the enclosing code block matches the expected output. More...
#include <outputcheck.h>
Public Member Functions | |
OutputCheck (const std::string &expectedOutput, std::ostream &os=std::cout) | |
Redirects standard output to an internal buffer. | |
OutputCheck (std::string &&expectedOutput, std::string &&alternativeOutput, std::ostream &os=std::cout) | |
Redirects standard output to an internal buffer. | |
OutputCheck (std::function< void(const std::string &output)> &&customCheck, std::ostream &os=std::cout) | |
~OutputCheck () noexcept(false) | |
Asserts the buffered standard output and restores the regular behaviour of std::cout. | |
The StandardOutputCheck class asserts whether the (standard) output written in the enclosing code block matches the expected output.
Definition at line 20 of file outputcheck.h.
|
inline |
Redirects standard output to an internal buffer.
Definition at line 39 of file outputcheck.h.
|
inline |
Redirects standard output to an internal buffer.
Definition at line 50 of file outputcheck.h.
CppUtilities::OutputCheck::OutputCheck | ( | std::function< void(const std::string &output)> && | customCheck, |
std::ostream & | os = std::cout ) |
|
inline |
Asserts the buffered standard output and restores the regular behaviour of std::cout.
Definition at line 73 of file outputcheck.h.