MCPcopy Create free account
hub / github.com/catboost/catboost / Execute

Method Execute

library/cpp/testing/unittest/registar.cpp:472–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472unsigned NUnitTest::TTestFactory::Execute() {
473 Items_.QuickSort(TCmp());
474 Processor_->Start();
475
476 TSet<TString> types;
477 size_t cnt = 0;
478
479 for (TIntrusiveList<ITestBaseFactory>::TIterator factory = Items_.Begin(); factory != Items_.End(); ++factory) {
480 if (!Processor_->CheckAccess(factory->Name(), cnt++)) {
481 continue;
482 }
483
484 THolder<TTestBase> test(factory->ConstructTest());
485
486#ifdef _unix_ // on Windows RTTI causes memory leaks
487 TString type = test->TypeId();
488 if (types.insert(type).second == false) {
489 warnx("Duplicate suite found: %s (%s). Probably you have copy-pasted suite without changing it name", factory->Name().c_str(), type.c_str());
490 return 1;
491 }
492#endif // _unix_
493
494 test->Parent_ = this;
495
496#ifdef UT_SKIP_EXCEPTIONS
497 try {
498#endif
499 test->Execute();
500#ifdef UT_SKIP_EXCEPTIONS
501 } catch (...) {
502 }
503#endif
504 }
505
506 Processor_->End();
507
508 return bool(Processor_->FailTests());
509}
510
511void NUnitTest::TTestFactory::SetProcessor(ITestSuiteProcessor* processor) {
512 Processor_ = processor;

Callers 2

DoListFunction · 0.45
RunMainMethod · 0.45

Calls 13

warnxFunction · 0.85
QuickSortMethod · 0.80
FailTestsMethod · 0.80
TCmpClass · 0.70
StartMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45
CheckAccessMethod · 0.45
NameMethod · 0.45
ConstructTestMethod · 0.45
TypeIdMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected