Boost C++ Libraries 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.

Class test_results

boost::unit_test::test_results — Collection of attributes constituting test unit results.


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

class test_results {

  // public member functions
  typedef BOOST_READONLY_PROPERTY(counter_t, 
  void operator+=(test_results const &);
  void clear();

  // public data members
  counter_prop p_assertions_passed;
  counter_prop p_assertions_failed;
  counter_prop p_warnings_failed;
  counter_prop p_expected_failures;
  counter_prop p_test_cases_passed;
  counter_prop p_test_cases_warned;
  counter_prop p_test_cases_failed;
  counter_prop p_test_cases_skipped;
  counter_prop p_test_cases_aborted;
  bool_prop p_aborted;
  bool_prop p_skipped;


This class is a collection of attributes describing testing results. The atributes presented as public properties on an instance of the class. In addition summary conclusion methods are presented to generate simple answer to pass/fail question

test_results public member functions

  1. typedef BOOST_READONLY_PROPERTY(counter_t, 
    Type representing counter like public property.
  2. typedef BOOST_READONLY_PROPERTY(bool, 
    Type representing boolean like public property.
  3. void operator+=(test_results const &);
  4. void clear();