#include <wibble/string.h>
#include <iostream>
#include <cstdlib>
Go to the source code of this file.
Classes | |
| struct | Location |
| struct | AssertFailed |
| struct | ExpectFailure |
Defines | |
| #define | LOCATION(stmt) Location( __FILE__, __LINE__, stmt ) |
| #define | assert(x) assert_fn( LOCATION( #x ), x ) |
| #define | assert_eq(x, y) assert_eq_fn( LOCATION( #x " == " #y ), x, y ) |
| #define | assert_neq(x, y) assert_neq_fn( LOCATION( #x " != " #y ), x, y ) |
| #define | assert_list_eq(x, y) |
Typedefs | |
| typedef void | Test |
Functions | |
| template<typename X> | |
| AssertFailed & | operator<< (AssertFailed &f, X x) |
| template<typename X> | |
| void | assert_fn (Location l, X x) |
| template<typename X, typename Y> | |
| void | assert_eq_fn (Location l, X x, Y y) |
| 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 |
| #define assert | ( | x | ) | assert_fn( LOCATION( #x ), x ) |
Referenced by 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(), TestChildprocess::kill(), TestCommandlineEngine::longOptsWithArgs(), TestCommandlineEngine::longOptsWithDashes(), TestBuffer::nonemptiness(), TestCommandlineEngine::optsAndArgs(), TestCommandlineEngine::optsOnly(), TestChildprocess::output(), Main::processStatus(), TestChildprocess::redirect(), TestBuffer::resize(), RunAll::runFrom(), TestChildprocess::shellCommand(), TestMMap::simple(), TestList::single(), TestNetBuffer::skipBytes(), TestNetBuffer::startAtBeginning(), and TestException::system().
| #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(), TestChildprocess::kill(), TestCommandlineEngine::longOptsWithArgs(), TestCommandlineEngine::longOptsWithDashes(), TestBuffer::nonemptiness(), TestCommandlineEngine::optsAndArgs(), TestCommandlineEngine::optsOnly(), TestChildprocess::output(), Main::parent(), Main::processStatus(), TestChildprocess::redirect(), TestBuffer::resize(), TestThread::sharedMemory(), TestChildprocess::shellCommand(), TestMMap::simple(), TestList::single(), TestNetBuffer::skipBytes(), TestList::sorted(), TestNetBuffer::startAtBeginning(), TestList::stl(), TestCommandlineOptions::stringOpt(), TestException::system(), TestList::take(), TestBuffer::takeover(), TestProcess::umask(), TestList::unique(), TestCommandlineOptions::vectorBoolOpt(), TestCommandlineOptions::vectorStringOpt(), RunAll::waitForAck(), and wibble::exception::AddContext::~AddContext().
| #define assert_list_eq | ( | x, | |||
| y | ) |
Value:
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 LOCATION | ( | stmt | ) | Location( __FILE__, __LINE__, stmt ) |
| typedef void Test |
| void assert_eq_fn | ( | Location | l, | |
| X | x, | |||
| Y | y | |||
| ) | [inline] |
| void assert_fn | ( | Location | l, | |
| X | x | |||
| ) | [inline] |
| void assert_list_eq_fn | ( | Location | loc, | |
| int | c, | |||
| X | l, | |||
| const typename X::Type | check[] | |||
| ) | [inline] |
References wibble::str::fmt().
| void assert_neq_fn | ( | Location | l, | |
| X | x, | |||
| Y | y | |||
| ) | [inline] |
| void beginAssertFailure | ( | ) | [inline] |
| void endAssertFailure | ( | ) | [inline] |
| AssertFailed& operator<< | ( | AssertFailed & | f, | |
| X | x | |||
| ) | [inline] |
References AssertFailed::str.
| int assertFailure |
Referenced by AssertFailed::AssertFailed(), beginAssertFailure(), endAssertFailure(), and AssertFailed::~AssertFailed().
1.5.6