MCPcopy Create free account
hub / github.com/SOUI2/soui / runAllTest

Method runAllTest

third-part/jsoncpp/src/test_lib_json/jsontest.cpp:272–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272bool Runner::runAllTest(bool printSummary) const {
273 unsigned int count = testCount();
274 std::deque<TestResult> failures;
275 for (unsigned int index = 0; index < count; ++index) {
276 TestResult result;
277 runTestAt(index, result);
278 if (result.failed()) {
279 failures.push_back(result);
280 }
281 }
282
283 if (failures.empty()) {
284 if (printSummary) {
285 printf("All %d tests passed\n", count);
286 }
287 return true;
288 } else {
289 for (unsigned int index = 0; index < failures.size(); ++index) {
290 TestResult& result = failures[index];
291 result.printFailure(count > 1);
292 }
293
294 if (printSummary) {
295 unsigned int failedCount = static_cast<unsigned int>(failures.size());
296 unsigned int passedCount = count - failedCount;
297 printf("%d/%d tests passed (%d failure(s))\n",
298 passedCount,
299 count,
300 failedCount);
301 }
302 return false;
303 }
304}
305
306bool Runner::testIndex(const JSONCPP_STRING& testName,
307 unsigned int& indexOut) const {

Callers 1

runCommandLineMethod · 0.80

Calls 5

printFailureMethod · 0.80
failedMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected