ARB
Classes | Functions | Variables
arb_test Namespace Reference

Classes

class  asserter
 
class  containing
 
class  copy
 
class  copy< const char * >
 
class  copy< copy< T > >
 
class  debug_asserter
 
class  epsilon_similar
 
struct  expectation
 
class  expectation_group
 
class  FINAL_TYPE
 
struct  group_match
 
class  locinfo
 
class  match_expectation
 
struct  matchable
 
struct  matcher
 
class  predicate
 
class  predicate_description
 
class  predicate_matcher
 
struct  StaticCode
 
class  str
 
class  value_matcher
 

Functions

charval2readable (bool b)
 
charval2readable (int i)
 
charval2hex (int i)
 
charval2readable (long L)
 
charval2hex (long L)
 
charval2readable (size_t z)
 
charval2hex (size_t z)
 
charval2readable (long unsigned u)
 
charval2hex (long unsigned u)
 
charval2readable (double d)
 
charval2readable (unsigned char c)
 
charval2readable (const char *s)
 
template<typename T >
copy< Tmake_copy (const T &t)
 
copy< const char * > make_copy (const char *p)
 
copy< const char * > make_copy (char *p)
 
copy< const char * > make_copy (const unsigned char *p)
 
copy< const char * > make_copy (unsigned char *p)
 
copy< const char * > make_copy (const signed char *p)
 
copy< const char * > make_copy (signed char *p)
 
copy< unsigned charmake_copy (char p)
 
copy< unsigned charmake_copy (unsigned char p)
 
copy< unsigned charmake_copy (signed char p)
 
template<typename T >
str readable (const copy< T > &v)
 
template<typename T >
str readableHex (const copy< T > &v)
 
template<typename T >
bool operator== (const copy< T > &v1, const copy< T > &v2)
 
template<typename T >
bool operator!= (const copy< T > &v1, const copy< T > &v2)
 
template<>
bool operator==< const char * > (const copy< const char * > &v1, const copy< const char * > &v2)
 
template<typename T >
void print (const T &t)
 
template<typename T >
void print_hex (const T &t)
 
template<typename T1 , typename T2 >
void print_pair (T1 t1, T2 t2)
 
template<typename T1 , typename T2 >
void print_hex_pair (T1 t1, T2 t2)
 
void print (const char *s)
 
void print (char c)
 
void print (int i)
 
void space ()
 
void nl ()
 
void print_indent (int indent)
 
void spaced (const char *word)
 
void select_spaced (bool first, const char *singular, const char *plural)
 
template<typename FUNC >
predicate< FUNC > make_predicate (FUNC func, const char *primary, const char *inverse)
 
template<typename T >
bool equals (const copy< T > &t1, const copy< T > &t2)
 
template<typename T >
bool less (const copy< T > &t1, const copy< T > &t2)
 
template<typename T >
bool more (const copy< T > &t1, const copy< T > &t2)
 
template<typename T , typename U >
const matchable_value< Tmake_matchable_value (const U &other, const char *code_)
 
template<typename T >
const matchable_value< TCREATE_matchable (const copy< T > &val, const char *code)
 
group_matcher all ()
 
group_matcher none ()
 
group_matcher atleast (int min)
 
group_matcher atmost (int max)
 
group_matcher exactly (int amount)
 
match_expectation wrong (const expectation &e)
 
match_expectation reports_error (const char *error)
 
match_expectation doesnt_report_error (const char *error)
 
match_expectation reported_error_contains (const char *error, const char *part)
 
template<typename T , typename U , typename V >
void expect_broken (const arb_test::matchable_value< T > &That, const U &want, const V &got, const char *file, int line)
 

Variables

const int MAX_GROUP_SIZE = 5
 

Function Documentation

char* arb_test::val2readable ( bool  b)
inline

Definition at line 278 of file test_unit.h.

Referenced by arb_test::asserter::expect_brokenif(), print(), and readable().

char* arb_test::val2readable ( int  i)
inline

Definition at line 280 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2hex ( int  i)
inline

Definition at line 281 of file test_unit.h.

References arb_test::StaticCode::strf().

Referenced by print_hex().

char* arb_test::val2readable ( long  L)
inline

Definition at line 283 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2hex ( long  L)
inline

Definition at line 284 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2readable ( size_t  z)
inline

Definition at line 286 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2hex ( size_t  z)
inline

Definition at line 287 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2readable ( long unsigned  u)
inline

Definition at line 294 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2hex ( long unsigned  u)
inline

Definition at line 295 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2readable ( double  d)
inline

Definition at line 298 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2readable ( unsigned char  c)
inline

Definition at line 300 of file test_unit.h.

References arb_test::StaticCode::strf().

char* arb_test::val2readable ( const char s)
inline

Definition at line 301 of file test_unit.h.

References arb_test::StaticCode::readable_string().

template<typename T >
copy<T> arb_test::make_copy ( const T t)
inline

Definition at line 332 of file test_unit.h.

Referenced by print(), and print_hex().

copy<const char *> arb_test::make_copy ( const char p)
inline

Definition at line 334 of file test_unit.h.

copy<const char *> arb_test::make_copy ( char p)
inline

Definition at line 335 of file test_unit.h.

copy<const char *> arb_test::make_copy ( const unsigned char p)
inline

Definition at line 336 of file test_unit.h.

copy<const char *> arb_test::make_copy ( unsigned char p)
inline

Definition at line 337 of file test_unit.h.

copy<const char *> arb_test::make_copy ( const signed char p)
inline

Definition at line 338 of file test_unit.h.

copy<const char *> arb_test::make_copy ( signed char p)
inline

Definition at line 339 of file test_unit.h.

copy<unsigned char> arb_test::make_copy ( char  p)
inline

Definition at line 341 of file test_unit.h.

copy<unsigned char> arb_test::make_copy ( unsigned char  p)
inline

Definition at line 342 of file test_unit.h.

copy<unsigned char> arb_test::make_copy ( signed char  p)
inline

Definition at line 343 of file test_unit.h.

template<typename T >
str arb_test::readable ( const copy< T > &  v)
template<typename T >
str arb_test::readableHex ( const copy< T > &  v)

Definition at line 346 of file test_unit.h.

template<typename T >
bool arb_test::operator== ( const copy< T > &  v1,
const copy< T > &  v2 
)

Definition at line 348 of file test_unit.h.

References T.

template<typename T >
bool arb_test::operator!= ( const copy< T > &  v1,
const copy< T > &  v2 
)

Definition at line 349 of file test_unit.h.

template<>
bool arb_test::operator==< const char * > ( const copy< const char * > &  v1,
const copy< const char * > &  v2 
)
inline

Definition at line 351 of file test_unit.h.

template<typename T >
void arb_test::print ( const T t)
inline
template<typename T >
void arb_test::print_hex ( const T t)
inline

Definition at line 364 of file test_unit.h.

References fputs(), make_copy(), and val2hex().

Referenced by print_hex_pair().

template<typename T1 , typename T2 >
void arb_test::print_pair ( T1  t1,
T2  t2 
)
inline

Definition at line 366 of file test_unit.h.

References fputs(), and print().

template<typename T1 , typename T2 >
void arb_test::print_hex_pair ( T1  t1,
T2  t2 
)
inline

Definition at line 371 of file test_unit.h.

References fputc(), and print_hex().

void arb_test::print ( const char s)
inline

Definition at line 410 of file test_unit.h.

References fputs().

void arb_test::print ( char  c)
inline

Definition at line 411 of file test_unit.h.

References fputc().

void arb_test::print ( int  i)
inline

Definition at line 412 of file test_unit.h.

void arb_test::space ( )
inline
void arb_test::nl ( )
inline
void arb_test::print_indent ( int  indent)
inline

Definition at line 417 of file test_unit.h.

References space().

Referenced by arb_test::group_match::dump(), and arb_test::value_matcher< T >::dump_expectation().

void arb_test::spaced ( const char word)
inline

Definition at line 419 of file test_unit.h.

References print(), and space().

Referenced by select_spaced().

void arb_test::select_spaced ( bool  first,
const char singular,
const char plural 
)
inline
template<typename FUNC >
predicate<FUNC> arb_test::make_predicate ( FUNC  func,
const char primary,
const char inverse 
)

Definition at line 637 of file test_unit.h.

template<typename T >
bool arb_test::equals ( const copy< T > &  t1,
const copy< T > &  t2 
)
inline

Definition at line 644 of file test_unit.h.

Referenced by AliData::differs_from(), and elementHasName().

template<typename T >
bool arb_test::less ( const copy< T > &  t1,
const copy< T > &  t2 
)
inline

Definition at line 645 of file test_unit.h.

Referenced by Cluster::lessByOrder(), and SortClusterIDsBy::operator()().

template<typename T >
bool arb_test::more ( const copy< T > &  t1,
const copy< T > &  t2 
)
inline

Definition at line 646 of file test_unit.h.

template<typename T , typename U >
const matchable_value<T> arb_test::make_matchable_value ( const U other,
const char code_ 
)
inline

Definition at line 679 of file test_unit.h.

References T.

template<typename T >
const matchable_value<T> arb_test::CREATE_matchable ( const copy< T > &  val,
const char code 
)

Definition at line 1009 of file test_unit.h.

group_matcher arb_test::all ( )
inline
group_matcher arb_test::none ( )
inline
group_matcher arb_test::atleast ( int  min)
inline

Definition at line 1013 of file test_unit.h.

group_matcher arb_test::atmost ( int  max)
inline

Definition at line 1014 of file test_unit.h.

group_matcher arb_test::exactly ( int  amount)
inline

Definition at line 1015 of file test_unit.h.

match_expectation arb_test::wrong ( const expectation e)
inline

Definition at line 1017 of file test_unit.h.

References none().

match_expectation arb_test::reports_error ( const char error)
inline

Definition at line 1104 of file test_unit.h.

References that.

match_expectation arb_test::doesnt_report_error ( const char error)
inline

Definition at line 1105 of file test_unit.h.

References that.

match_expectation arb_test::reported_error_contains ( const char error,
const char part 
)
inline

Definition at line 1106 of file test_unit.h.

References that.

template<typename T , typename U , typename V >
void arb_test::expect_broken ( const arb_test::matchable_value< T > &  That,
const U want,
const V &  got,
const char file,
int  line 
)
inline

Definition at line 1289 of file test_unit.h.

References line, and TEST_EXPECTATION__BROKEN_AT_LOC.

Variable Documentation

const int arb_test::MAX_GROUP_SIZE = 5

Definition at line 783 of file test_unit.h.