wibble::tests Namespace Reference

## Classes

class | Location
struct | LocationInfo
struct | TestBool
struct | TestEquals
struct | TestIsLt
struct | TestIsLte
struct | TestIsGt
struct | TestIsGte
struct | TestStartsWith
struct | TestEndsWith
struct | TestContains
struct | TestRegexp
struct | TestFileExists
struct | Actual
struct | ActualString

## Functions

void | test_assert_re_match (WIBBLE_TEST_LOCPRM, const std::string &regexp, const std::string &actual)
void | test_assert_startswith (WIBBLE_TEST_LOCPRM, const std::string &expected, const std::string &actual)
void | test_assert_endswith (WIBBLE_TEST_LOCPRM, const std::string &expected, const std::string &actual)
void | test_assert_contains (WIBBLE_TEST_LOCPRM, const std::string &expected, const std::string &actual)
void | test_assert_istrue (WIBBLE_TEST_LOCPRM, bool val)
void | test_assert_file_exists (WIBBLE_TEST_LOCPRM, const std::string &fname)
void | test_assert_not_file_exists (WIBBLE_TEST_LOCPRM, const std::string &fname)
void | impl_ensure (const Location &loc, bool res)
void | impl_ensure_contains (const wibble::tests::Location &loc, const std::string &haystack, const std::string &needle)
void | impl_ensure_not_contains (const wibble::tests::Location &loc, const std::string &haystack, const std::string &needle)
template<class Actual , class Expected >
void | impl_ensure_equals (const Location &loc, const Actual &actual, const Expected &expected)
template<class Actual , class Expected , class Precision >
void | impl_ensure_similar (const Location &loc, const Actual &actual, const Expected &expected, const Precision &precision)
template<typename A >
Actual< A > | actual (const A &actual)
ActualString | actual (const std::string &actual)
ActualString | actual (const char *actual)
ActualString | actual (char *actual)

## Function Documentation

## actual() [1/4]

ActualString wibble::tests::actual | ( | char * | actual | ) |

inline

References actual().

## actual() [2/4]

template<typename A >

Actual<A> wibble::tests::actual | ( | const A & | actual | ) |

inline

Referenced by actual(), impl_ensure_equals(), impl_ensure_similar(), test_assert_contains(), test_assert_endswith(), test_assert_re_match(), and test_assert_startswith().

## actual() [3/4]

ActualString wibble::tests::actual | ( | const char * | actual | ) |

inline

References actual().

## actual() [4/4]

ActualString wibble::tests::actual | ( | const std::string & | actual | ) |

inline

References actual().

## impl_ensure()

void wibble::tests::impl_ensure | ( | const Location & | loc,
|  | bool | res
| ) |  |

References wibble::tests::Location::fail_test().

## impl_ensure_contains()

void wibble::tests::impl_ensure_contains | ( | const wibble::tests::Location & | loc,
|  | const std::string & | haystack,
|  | const std::string & | needle
| ) |  |

References wibble::tests::Location::fail_test().

## impl_ensure_equals()

template<class Actual , class Expected >

void wibble::tests::impl_ensure_equals | ( | const Location & | loc,
|  | const Actual & | actual,
|  | const Expected & | expected
| ) |  |

References actual(), and wibble::tests::Location::fail_test().

## impl_ensure_not_contains()

void wibble::tests::impl_ensure_not_contains | ( | const wibble::tests::Location & | loc,
|  | const std::string & | haystack,
|  | const std::string & | needle
| ) |  |

References wibble::tests::Location::fail_test().

## impl_ensure_similar()

template<class Actual , class Expected , class Precision >

void wibble::tests::impl_ensure_similar | ( | const Location & | loc,
|  | const Actual & | actual,
|  | const Expected & | expected,
|  | const Precision & | precision
| ) |  |

References actual(), and wibble::tests::Location::fail_test().

## test_assert_contains()

void wibble::tests::test_assert_contains | ( | WIBBLE_TEST_LOCPRM | ,
|  | const std::string & | expected,
|  | const std::string & | actual
| ) |  |

References actual(), wibble::tests::Location::fail_test(), and wibble_test_location.

## test_assert_endswith()

void wibble::tests::test_assert_endswith | ( | WIBBLE_TEST_LOCPRM | ,
|  | const std::string & | expected,
|  | const std::string & | actual
| ) |  |

References actual(), wibble::str::endsWith(), wibble::tests::Location::fail_test(), and wibble_test_location.

## test_assert_file_exists()

void wibble::tests::test_assert_file_exists | ( | WIBBLE_TEST_LOCPRM | ,
|  | const std::string & | fname
| ) |  |

References wibble::sys::fs::exists(), wibble::tests::Location::fail_test(), and wibble_test_location.

## test_assert_istrue()

void wibble::tests::test_assert_istrue | ( | WIBBLE_TEST_LOCPRM | ,
|  | bool | val
| ) |  |

References wibble::tests::Location::fail_test(), and wibble_test_location.

## test_assert_not_file_exists()

void wibble::tests::test_assert_not_file_exists | ( | WIBBLE_TEST_LOCPRM | ,
|  | const std::string & | fname
| ) |  |

References wibble::sys::fs::exists(), wibble::tests::Location::fail_test(), and wibble_test_location.

## test_assert_re_match()

void wibble::tests::test_assert_re_match | ( | WIBBLE_TEST_LOCPRM | ,
|  | const std::string & | regexp,
|  | const std::string & | actual
| ) |  |

References actual(), wibble::tests::Location::fail_test(), wibble::Regexp::match(), and wibble_test_location.

## test_assert_startswith()

void wibble::tests::test_assert_startswith | ( | WIBBLE_TEST_LOCPRM | ,
|  | const std::string & | expected,
|  | const std::string & | actual
| ) |  |

References actual(), wibble::tests::Location::fail_test(), wibble::str::startsWith(), and wibble_test_location.