Iterates over a vector of TestCases, keeping a running sum of the results of calling a given int-returning method on each. Returns the sum.
| 1615 | // results of calling a given int-returning method on each. |
| 1616 | // Returns the sum. |
| 1617 | static int SumOverTestCaseList(const std::vector<TestCase*>& case_list, |
| 1618 | int (TestCase::*method)() const) { |
| 1619 | int sum = 0; |
| 1620 | for (size_t i = 0; i < case_list.size(); i++) { |
| 1621 | sum += (case_list[i]->*method)(); |
| 1622 | } |
| 1623 | return sum; |
| 1624 | } |
| 1625 | |
| 1626 | // Returns true iff the test case passed. |
| 1627 | static bool TestCasePassed(const TestCase* test_case) { |
no test coverage detected