| 9 | TTests Tests; |
| 10 | |
| 11 | virtual void Execute() override final { |
| 12 | AtStart(); |
| 13 | |
| 14 | for (typename TTests::iterator i = Tests.begin(), ie = Tests.end(); i != ie; ++i) { |
| 15 | if (!CheckAccessTest(i->Name_)) { |
| 16 | continue; |
| 17 | } |
| 18 | TTestContext context(this->Processor()); |
| 19 | try { |
| 20 | BeforeTest(i->Name_); |
| 21 | { |
| 22 | TCleanUp cleaner(this); |
| 23 | TTestBase::Run([i, &context] { i->Body_(context); }, Name(), i->Name_, i->ForceFork_); |
| 24 | } |
| 25 | } catch (const ::NUnitTest::TAssertException&) { |
| 26 | } catch (const yexception& e) { |
| 27 | CATCH_REACTION_BT(i->Name_, e, &context); |
| 28 | } catch (const std::exception& e) { |
| 29 | CATCH_REACTION(i->Name_, e, &context); |
| 30 | } catch (...) { |
| 31 | AddError("non-std exception!", &context); |
| 32 | } |
| 33 | Finish(i->Name_, &context); |
| 34 | } |
| 35 | |
| 36 | AtEnd(); |
| 37 | } |
| 38 | }; |
| 39 | } |