~zorba-coders/zorba/llvm

« back to all changes in this revision

Viewing changes to src/unit_tests/test_base64.cpp

1. Improved catch() for unit tests.
2. Improved bpackfail() for streambufs.
3. locale template function additions.
4. Enhanced aton(). Approved: Chris Hillery, Paul J. Lucas

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
#define ASSERT_NO_EXCEPTION( NO, EXPR ) \
55
55
  try { EXPR; } \
56
 
  catch ( std::exception const &e ) { print_exception( NO, #EXPR, __LINE__, e ); }
 
56
  catch ( exception const &e ) { print_exception( NO, #EXPR, __LINE__, e ); } \
 
57
  catch ( ... ) { assert_true( NO, #EXPR, __LINE__, false ); }
57
58
 
58
59
#define ASSERT_EXCEPTION( NO, EXPR, EXCEPTION ) \
59
60
  try { EXPR; assert_true( NO, #EXPR, __LINE__, false ); } \
60
 
  catch ( EXCEPTION const& ) { }
 
61
  catch ( EXCEPTION const& ) { } \
 
62
  catch ( ... ) { assert_true( NO, #EXPR, __LINE__, false ); }
61
63
 
62
64
///////////////////////////////////////////////////////////////////////////////}
63
65