「view this page in B3 βῆτα server」

Revisions №58662

branch: master 「№58662」
Commited by: Andrew Leaver-Fay
GitHub commit link: 「a0044a002c51ad23」
Difference from previous tested commit:  code diff
Commit date: 2016-05-02 09:08:37

Unit tests should produce output only when they fail.The first commit in this pull request makes it possible to trap on debug_assert failures. It also makes it possible to trap an expected exception in unit tests coming from utility_exit WITHOUT noise being piped through std::cerr. Many commits here preface the calling of functions that are expected to fail with calls to utility_exit_with_message(...) with a call to The remaining unit tests replace usage of TS_TRACE with sending output to basic::Tracer objects (that can be muted). Unit tests should produce output only when they fail. The first commit in this pull request makes it possible to trap on debug_assert failures. Specifically, it adds a function "throw_on_next_debug_assert_failure" so that instead of printing the backtrace to std::cerr and triggering a trap in assert( fail ), instead the debug_assert macro will throw an exception, which can be caught in a unit test without making any noise. The second or third commit also makes it possible to trap an expected exception in unit tests coming from utility_exit WITHOUT noise being piped through std::cerr. Many commits here preface the calling of functions that are expected to fail with calls to utility_exit_with_message(...) with a call to throw_on_next_assertion_failure so that they too avoid a message ending up printed. Several unit test changes replace usage of TS_TRACE with sending output to basic::Tracer objects (that can be muted). A small number of source changes print output to Tracers instead of to cout. These changes are responsible for the cosmetic integration test changes. Thank you Rocco, Vikram, and Steven for pitching in. @roccomoretti @vmullig @smlewis Please do not print directly to cout. Please do not use TS_TRACE. From here on out, if you see a message while running the unit tests, that means that something bad has happened. (It would be nice in the future to have test/run.py print very little -- it currently tells you about all the tests that it has launched, which is verbose for my tastes. Perhaps it could do that nifty thing where it overwrites the last line of a terminal the way ninja does?)

...