Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class progress_monitor_t

boost::unit_test::progress_monitor_t — This class implements test observer interface and updates test progress as test units finish or get aborted.

Synopsis

// In header: <boost/test/progress_monitor.hpp>


class progress_monitor_t : public boost::unit_test::test_observer {
public:

  // public member functions
  virtual void test_finish();
  virtual void test_unit_start(test_unit const &);
  virtual void test_unit_skipped(test_unit const &);
  virtual void test_unit_timed_out(test_unit const &);
  virtual void test_unit_aborted(test_unit const &);
  virtual void assertion_result(unit_test::assertion_result);
  virtual void exception_caught(execution_exception const &);
};

Description

progress_monitor_t public member functions

  1. virtual void test_finish();
    Called after the framework ends executing the test cases.
    [Note] Note

    The call is made with a reversed priority order.

  2. virtual void test_unit_start(test_unit const &);
    Called before the framework starts executing a test unit.

  3. virtual void test_unit_skipped(test_unit const &);
    backward compatibility
  4. virtual void test_unit_timed_out(test_unit const &);
    Called when the test timed out.

    This function is called to signal that a test unit (case or suite) timed out. A valid test unit is available through boost::unit_test::framework::current_test_unit

  5. virtual void test_unit_aborted(test_unit const &);
    Called when a test unit indicates a fatal error.

    A fatal error happens when

    • a strong assertion (with REQUIRE) fails, which indicates that the test case cannot continue

    • an unexpected exception is caught by the Boost.Test framework

  6. virtual void assertion_result(unit_test::assertion_result);
  7. virtual void exception_caught(execution_exception const &);
    Called when an exception is intercepted.

    In case an exception is intercepted, this call happens before the call to test_unit_aborted in order to log additional data about the exception.


PrevUpHomeNext