|
wibble
0.1.28
|


Go to the source code of this file.
Classes | |
| struct | Location |
| struct | AssertFailed |
| struct | ExpectFailure |
Defines | |
| #define | LOCATION(stmt) Location( __FILE__, __LINE__, stmt ) |
| #define | LOCATION_I(stmt, i) Location( __FILE__, __LINE__, stmt, i ) |
| #define | assert(x) assert_fn( LOCATION( #x ), x ) |
| #define | assert_pred(p, x) |
| #define | assert_eq(x, y) assert_eq_fn( LOCATION( #x " == " #y ), x, y ) |
| #define | assert_leq(x, y) assert_leq_fn( LOCATION( #x " <= " #y ), x, y ) |
| #define | assert_eq_l(i, x, y) assert_eq_fn( LOCATION_I( #x " == " #y, i ), x, y ) |
| #define | assert_neq(x, y) assert_neq_fn( LOCATION( #x " != " #y ), x, y ) |
| #define | assert_list_eq(x, y) |
| #define | assert_die() assert_die_fn( LOCATION( "forbidden code path tripped" ) ) |
Typedefs | |
| typedef void | Test |
Functions | |
| template<typename X > | |
| AssertFailed & | operator<< (AssertFailed &f, X x) |
| template<typename X > | |
| void | assert_fn (Location l, X x) |
| void | assert_die_fn (Location l) __attribute__((noreturn)) |
| template<typename X , typename Y > | |
| void | assert_eq_fn (Location l, X x, Y y) |
| template<typename X , typename Y > | |
| void | assert_leq_fn (Location l, X x, Y y) |
| template<typename X > | |
| void | assert_pred_fn (Location l, X x, bool p) |
| template<typename X > | |
| void | assert_list_eq_fn (Location loc, int c, X l, const typename X::Type check[]) |
| template<typename X , typename Y > | |
| void | assert_neq_fn (Location l, X x, Y y) |
| void | beginAssertFailure () |
| void | endAssertFailure () |
Variables | |
| int | assertFailure |
Referenced by TestFs::_deleteIfExists(), TestFs::_isDirectory(), TestFs::_mkFilePath(), TestFs::_mkPath2(), TestList::append(), TestEmpty::basic(), TestList::checkListSorted(), TestList::checkOddList(), TestCommandlineEngine::clusteredShortOpts(), TestCommandlineEngine::commandsWithoutCommand(), TestCommandlineEngine::commandsWithOverlappingArgs(), TestCommandlineEngine::commandWithArg(), TestBuffer::copy(), TestCommandlineEngine::creationShortcuts(), TestFs::directoryIterate(), TestBuffer::emptiness(), TestList::empty(), endAssertFailure(), TestCommandlineCore::eraseAndAdvance(), TestException::generic(), TestFs::invalidDirectories(), TestCommandlineEngine::longOptsWithArgs(), TestCommandlineEngine::longOptsWithDashes(), TestBuffer::nonemptiness(), TestCommandlineEngine::noSwitchesAfterFirstArg(), TestCommandlineEngine::optsAndArgs(), TestCommandlineEngine::optsOnly(), TestBuffer::resize(), TestList::single(), TestNetBuffer::skipBytes(), TestNetBuffer::startAtBeginning(), and TestException::system().
| #define assert_die | ( | ) | assert_die_fn( LOCATION( "forbidden code path tripped" ) ) |
Referenced by wibble::sys::sig::Action::Action(), and wibble::sys::sig::ProcMask::ProcMask().
| #define assert_eq | ( | x, | |
| y | |||
| ) | assert_eq_fn( LOCATION( #x " == " #y ), x, y ) |
Referenced by TestException::addContext(), TestList::append(), TestList::appendCount(), TestException::badCast(), TestEmpty::basic(), TestCommandlineOptions::boolOpt(), TestList::checkOddList(), TestCommandlineEngine::clusteredShortOpts(), TestCommandlineEngine::commandsWithoutCommand(), TestCommandlineEngine::commandsWithOverlappingArgs(), TestCommandlineEngine::commandWithArg(), TestBuffer::copy(), TestList::count(), TestCommandlineEngine::creationShortcuts(), TestBuffer::emptiness(), TestCommandlineCore::eraseAndAdvance(), TestThread::execution(), TestList::filtered(), TestProcess::getcwdAndChdir(), TestCommandlineOptions::intOpt(), TestCommandlineCore::isSwitch(), TestCommandlineEngine::longOptsWithArgs(), TestCommandlineEngine::longOptsWithDashes(), TestBuffer::nonemptiness(), TestCommandlineEngine::noSwitchesAfterFirstArg(), TestCommandlineEngine::optsAndArgs(), TestCommandlineEngine::optsOnly(), TestBuffer::resize(), TestThread::sharedMemory(), TestSignal::sigAction(), TestSignal::sigProcMask(), TestList::single(), TestNetBuffer::skipBytes(), TestList::sorted(), TestNetBuffer::startAtBeginning(), TestList::stl(), TestCommandlineOptions::stringOpt(), TestException::system(), TestBuffer::takeover(), TestProcess::umask(), TestList::unique(), TestCommandlineOptions::vectorBoolOpt(), TestCommandlineOptions::vectorStringOpt(), and wibble::exception::AddContext::~AddContext().
| #define assert_eq_l | ( | i, | |
| x, | |||
| y | |||
| ) | assert_eq_fn( LOCATION_I( #x " == " #y, i ), x, y ) |
| #define assert_leq | ( | x, | |
| y | |||
| ) | assert_leq_fn( LOCATION( #x " <= " #y ), x, y ) |
| #define assert_list_eq | ( | x, | |
| y | |||
| ) |
assert_list_eq_fn( LOCATION( #x " == " #y ), \ sizeof( y ) / sizeof( y[0] ), x, y )
| #define assert_neq | ( | x, | |
| y | |||
| ) | assert_neq_fn( LOCATION( #x " != " #y ), x, y ) |
| #define assert_pred | ( | p, | |
| x | |||
| ) |
assert_pred_fn( \ LOCATION( #p "( " #x " )" ), x, p( x ) )
| #define LOCATION_I | ( | stmt, | |
| i | |||
| ) | Location( __FILE__, __LINE__, stmt, i ) |
| typedef void Test |
| void assert_die_fn | ( | Location | l | ) |
| void assert_eq_fn | ( | Location | l, |
| X | x, | ||
| Y | y | ||
| ) |
| void assert_leq_fn | ( | Location | l, |
| X | x, | ||
| Y | y | ||
| ) |
| void assert_list_eq_fn | ( | Location | loc, |
| int | c, | ||
| X | l, | ||
| const typename X::Type | check[] | ||
| ) |
References wibble::str::fmt().
| void assert_neq_fn | ( | Location | l, |
| X | x, | ||
| Y | y | ||
| ) |
| void assert_pred_fn | ( | Location | l, |
| X | x, | ||
| bool | p | ||
| ) |
| void beginAssertFailure | ( | ) | [inline] |
References assertFailure.
Referenced by ExpectFailure::ExpectFailure().
| void endAssertFailure | ( | ) | [inline] |
References assert, and assertFailure.
Referenced by ExpectFailure::~ExpectFailure().
| AssertFailed& operator<< | ( | AssertFailed & | f, |
| X | x | ||
| ) | [inline] |
References AssertFailed::str.
| int assertFailure |
Referenced by AssertFailed::AssertFailed(), beginAssertFailure(), endAssertFailure(), and AssertFailed::~AssertFailed().
1.7.6.1