MCPcopy Create free account
hub / github.com/Gecode/gecode / main

Function main

test/test.cpp:459–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457
458
459int
460main(int argc, char* argv[]) {
461 using namespace Test;
462#ifdef GECODE_HAS_MTRACE
463 mtrace();
464#endif
465
466 opt.parse(argc, argv);
467
468 Base::sort();
469
470 if (opt.list) {
471 for (Base* t = Base::tests() ; t != nullptr; t = t->next() ) {
472 std::cout << t->name() << std::endl;
473 }
474 exit(EXIT_SUCCESS);
475 }
476
477 std::vector<Base*> tests;
478 bool started = opt.start_from == nullptr ? true : false;
479 for (Base* t = Base::tests() ; t != nullptr; t = t->next() ) {
480 if (!started) {
481 if (t->name().find(opt.start_from) != std::string::npos) {
482 started = true;
483 } else {
484 continue;
485 }
486 }
487 if (opt.is_test_name_matching(t->name())) {
488 tests.emplace_back(t);
489 }
490 }
491
492 if (opt.threads > 1) {
493 return run_tests_parallel(tests, opt);
494 } else {
495 return run_tests(tests, opt);
496 }
497}
498
499std::ostream&
500operator<<(std::ostream& os, const Test::ind& i) {

Callers

nothing calls this directly

Calls 8

sortFunction · 0.85
run_tests_parallelFunction · 0.85
run_testsFunction · 0.85
is_test_name_matchingMethod · 0.80
parseMethod · 0.45
nextMethod · 0.45
nameMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected