Changeset 1358
- Timestamp:
- 07/31/08 01:07:47 (5 months ago)
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/test/test_helpers.hxx (modified) (3 diffs)
- trunk/test/unit/test_test_helpers.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r1357 r1358 1 2008-07-31 Jeroen T. Vermeulen <jtv@xs4all.nl> 2 test/test085.cxx, test/test092.cxx: 3 - Converted to test framework. 4 test/test_helpers.hxx, test/unit/test_test_helpers.cxx: 5 - PQXX_CHECK_THROWS() swallowed all std::exception throws! 1 6 2008-07-25 Jeroen T. Vermeulen <jtv@xs4all.nl> 2 7 src/connection_base.cxx: trunk/test/test_helpers.hxx
r1354 r1358 148 148 // Verify that variable has the expected value. 149 149 #define PQXX_CHECK_EQUAL(actual, expected, desc) \ 150 if (!( expected == actual)) throw pqxx::test::test_failure( \150 if (!((expected) == (actual))) throw pqxx::test::test_failure( \ 151 151 __FILE__, \ 152 152 __LINE__, \ … … 158 158 // Verify that two values are not equal. 159 159 #define PQXX_CHECK_NOT_EQUAL(value1, value2, desc) \ 160 if (!( value1 != value2)) throw pqxx::test::test_failure( \160 if (!((value1) != (value2))) throw pqxx::test::test_failure( \ 161 161 __FILE__, \ 162 162 __LINE__, \ … … 174 174 pqxx_check_throws_failed = false; \ 175 175 } \ 176 catch (const exception_type &) {} \ 177 catch (const PGSTD::exception &e) \ 178 { \ 179 throw pqxx::test::test_failure( \ 180 __FILE__, \ 181 __LINE__, \ 182 PGSTD::string(desc) + " " \ 183 "(" #action ": " \ 184 "expected=" #exception_type ", " \ 185 "threw='" + e.what() + "')"); \ 186 } \ 176 catch (const PGSTD::exception &e) {} \ 187 177 catch (...) \ 188 178 { \ trunk/test/unit/test_test_helpers.cxx
r1291 r1358 7 7 8 8 void empty() {} 9 10 void test_exception() 11 { 12 PQXX_CHECK_THROWS( 13 throw exception(), 14 exception, 15 "Plain exception not handled properly by PQXX_CHECK_THROWS.") 16 } 9 17 10 18 void test_simple_failure()
