metatest::test_suite

suite_path instances represent locations in the test suite hierarchy. Instances are immutable, thus their state can not be changed after construction.

#include <metatest/test_suite.hpp>

Types

suite_path::suite_map

Associative container mapping std::string keys to test_suite values.

suite_path::result_list

Container of test_result values.

Constructors

No public constructors are available.

Methods

None of the methods throws an exception.

size_t test_suite::failure_count() const

Number of failed tests.

size_t test_suite::count() const

Number of all tests.

const test_suite::suite_map& test_suite::suites() const

Suites which have the current suite as parent.

const test_suite::result_list& test_suite::results() const

Result objects corresponding to the tests within the current suite.

Example

int process_results(const test_suite& root_)
{
  return root_.failure_count() == 0 ? 0 : 1;
}

[up]