C++ Utilities
4.12.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
Contains classes and functions utilizing creating of test applications. More...
Namespaces | |
Literals | |
Contains literals to ease asserting with CPPUNIT_ASSERT_EQUAL. | |
Classes | |
class | AsHexNumber |
The AsHexNumber class allows printing values asserted with cppunit (or similar test framework) using the hex system in the error case. More... | |
class | OutputCheck |
The StandardOutputCheck class asserts whether the (standard) output written in the enclosing code block matches the expected output. More... | |
class | TestApplication |
The TestApplication class simplifies writing test applications that require opening test files. More... | |
Enumerations | |
enum | WorkingCopyMode { WorkingCopyMode::CreateCopy, WorkingCopyMode::NoCopy } |
The WorkingCopyMode enum specifies additional options to influence behavior of TestApplication::workingCopyPathMode(). More... | |
Functions | |
CPP_UTILITIES_EXPORT std::string | testFilePath (const std::string &name) |
Convenience function which returns the full path of the test file with the specified name. More... | |
template<typename T > | |
bool | operator== (const AsHexNumber< T > &lhs, const AsHexNumber< T > &rhs) |
Provides operator == required by CPPUNIT_ASSERT_EQUAL. More... | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, const AsHexNumber< T > &value) |
Provides the actual formatting of the output for AsHexNumber class. More... | |
template<typename T > | |
AsHexNumber< T > | asHexNumber (const T &value) |
Wraps a value to be printed using the hex system in the error case when asserted with cppunit (or similar test framework). More... | |
template<typename Pair , Traits::EnableIf< Traits::IsSpecializationOf< Pair, std::pair >> ...> | |
std::ostream & | operator<< (std::ostream &out, const Pair &pair) |
Allows printing pairs so key/values of maps/hashes can be asserted using CPPUNIT_ASSERT_EQUAL. More... | |
template<typename Iteratable , Traits::EnableIf< Traits::IsIteratable< Iteratable >, Traits::Not< Traits::IsString< Iteratable >>> ...> | |
std::ostream & | operator<< (std::ostream &out, const Iteratable &iteratable) |
Allows printing iteratable objects so those can be asserted using CPPUNIT_ASSERT_EQUAL. More... | |
Contains classes and functions utilizing creating of test applications.
|
strong |
The WorkingCopyMode enum specifies additional options to influence behavior of TestApplication::workingCopyPathMode().
Enumerator | |
---|---|
CreateCopy | a working copy of the test file is created |
NoCopy | only the directory for the working copy is created but not the test file itself |
Definition at line 17 of file testutils.h.
AsHexNumber<T> TestUtilities::asHexNumber | ( | const T & | value | ) |
Wraps a value to be printed using the hex system in the error case when asserted with cppunit (or similar test framework).
Definition at line 179 of file testutils.h.
std::ostream& TestUtilities::operator<< | ( | std::ostream & | out, |
const AsHexNumber< T > & | value | ||
) |
Provides the actual formatting of the output for AsHexNumber class.
Definition at line 170 of file testutils.h.
|
inline |
Allows printing pairs so key/values of maps/hashes can be asserted using CPPUNIT_ASSERT_EQUAL.
Definition at line 196 of file testutils.h.
|
inline |
Allows printing iteratable objects so those can be asserted using CPPUNIT_ASSERT_EQUAL.
Definition at line 205 of file testutils.h.
bool TestUtilities::operator== | ( | const AsHexNumber< T > & | lhs, |
const AsHexNumber< T > & | rhs | ||
) |
Provides operator == required by CPPUNIT_ASSERT_EQUAL.
Definition at line 162 of file testutils.h.
|
inline |
Convenience function which returns the full path of the test file with the specified name.
Definition at line 105 of file testutils.h.