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 for the latest Boost documentation.
PrevUpHomeNext

Class test_results

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

Synopsis

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


class test_results {
public:
  // construct/copy/destruct
  test_results();

  // public member functions
  typedef BOOST_READONLY_PROPERTY(counter_t, 
                                  (results_collector_t)(test_results)(results_collect_helper));
  typedef BOOST_READONLY_PROPERTY(bool, 
                                  (results_collector_t)(test_results)(results_collect_helper));
  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;
};

Description

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 construct/copy/destruct

  1. test_results();

test_results public member functions

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

PrevUpHomeNext