MCPcopy Create free account
hub / github.com/RenderKit/embree / execute

Method execute

tutorials/verify/verify.cpp:407–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405 };
406
407 VerifyApplication::TestReturnValue VerifyApplication::Test::execute(VerifyApplication* state, bool silent)
408 {
409 if (!isEnabled())
410 return SKIPPED;
411
412 if (!silent)
413 std::cout << std::setw(TEXT_ALIGN) << name << " ..." << std::flush;
414
415 TestReturnValue v = SKIPPED;
416 try {
417 v = run(state,silent);
418 } catch (...) {
419 v = FAILED;
420 }
421 TestReturnValue ev = ty != TEST_SHOULD_FAIL ? PASSED : FAILED;
422 bool passed = v == ev || v == SKIPPED;
423
424 if (silent)
425 {
426 Lock<MutexSys> lock(state->mutex);
427 if (v != SKIPPED) {
428 if (passed ) std::cout << state->green ("+") << std::flush;
429 else if (ignoreFailure) std::cout << state->yellow("!") << std::flush;
430 else std::cout << state->red ("-") << std::flush;
431 }
432 }
433 else
434 {
435 if (v == SKIPPED ) std::cout << state->green (" [SKIPPED]") << std::endl << std::flush;
436 else if (passed ) std::cout << state->green (" [PASSED]" ) << std::endl << std::flush;
437 else if (ignoreFailure) std::cout << state->yellow(" [FAILED] (ignored)") << std::endl << std::flush;
438 else std::cout << state->red (" [FAILED]" ) << std::endl << std::flush;
439 }
440
441 /* update passed/failed counters */
442 state->numPassedTests += passed;
443 if (ignoreFailure) state->numFailedAndIgnoredTests += !passed;
444 else state->numFailedTests += !passed;
445
446 /* do ignore failures for some specific tests */
447 if (ignoreFailure)
448 passed = true;
449 //assert(passed);
450 return passed ? PASSED : FAILED;
451 }
452
453 double VerifyApplication::Benchmark::readDatabase(VerifyApplication* state)
454 {

Callers 1

mainMethod · 0.45

Calls 10

runFunction · 0.85
sleepSecondsFunction · 0.85
parallel_forFunction · 0.85
greenMethod · 0.80
yellowMethod · 0.80
redMethod · 0.80
getAvgMethod · 0.45
getAvgSigmaMethod · 0.45
whatMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected