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.
| 1815 | // results of calling a given int-returning method on each. |
| 1816 | // Returns the sum. |
| 1817 | static int SumOverTestCaseList(const std::vector<TestCase*>& case_list, |
| 1818 | int (TestCase::*method)() const) { |
| 1819 | int sum = 0; |
| 1820 | for (size_t i = 0; i < case_list.size(); i++) { |
| 1821 | sum += (case_list[i]->*method)(); |
| 1822 | } |
| 1823 | return sum; |
| 1824 | } |
| 1825 | |
| 1826 | // Returns true iff the test case passed. |
| 1827 | static bool TestCasePassed(const TestCase* test_case) { |
no test coverage detected