MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / SumOverTestCaseList

Function SumOverTestCaseList

test/common/gtest/gtest.cpp:1817–1824  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

1815// results of calling a given int-returning method on each.
1816// Returns the sum.
1817static 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.
1827static bool TestCasePassed(const TestCase* test_case) {

Callers 7

successful_test_countMethod · 0.85
failed_test_countMethod · 0.85
disabled_test_countMethod · 0.85
reportable_test_countMethod · 0.85
total_test_countMethod · 0.85
test_to_run_countMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected