Next: , Previous: , Up: C++ Report Reference   [Contents][Index]


5.4.2 C++ Test Report Reference

C++ Type: test_report

Valid objects of this type represent the report generated by all executions of a test_case object.


C++ Constructor: test_report::test_report ()

Preconditions:

  1. None.

Effects:

  1. None.

Postconditions:

  1. The only operations defined on *this are the assignment and the destruction.


C++ Constructor: test_report::test_report (test_report&& other) noexcept
C++ Assignment Operator: test_report& test_report::operator= (test_report&& other) noexcept

Preconditions:

  1. None.

Effects:

  1. The validity from other is transferred to *this.
  2. The state of other is transferred to *this if other is valid.

Postconditions:

  1. other is not a valid object. Only destruction and assignment are defined on it.


C++ Method: char const* test_report::name () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value is equivalent to the name of the test that generated the report represented by *this.


Test Report Iteration

The following functions allow the iteration over the test reports. You may write on your code, being rep an object of type test_report:

  test_report rep = @dots{};

  for (auto const& e: rep) do_something_with_execution (e);

test_report::begin

C++ Method: test_report::iterator test_report::begin () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value points to the start of the sequence of execution reports associated to *this.


C++ Method: test_report::iterator test_report::end () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value points to the end of the sequence of execution reports associated to *this.


C++ Method: test_report::reverse_iterator test_report::rbegin () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value points to the last element of the sequence of execution reports associated to *this.


C++ Method: test_report::reverse_iterator test_report::rend () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value points to the reverse end of the sequence of execution reports associated to *this.


C++ Method: std::size_t test_report::size () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value is the number of executions associated to *this.


C++ Method: bool test_report::empty () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value is true if the number of executions associated to *this was zero.


C++ Method: test_report::range test_report::executions () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value is a valid range to iterate over the executions associated to *this in the order of execution.


C++ Method: test_report::reverse_range test_report::reverse_executions () const

Preconditions:

  1. *this is a valid object.

Effects:

  1. None.

Postconditions:

  1. The returned value is a valid range to iterate over the executions associated to *this in reverse order of execution.



Next: C++ Exec Report Reference, Previous: C++ Suite Report Reference, Up: C++ Report Reference   [Contents][Index]