diff options
Diffstat (limited to 'library/cpp/testing')
| -rw-r--r-- | library/cpp/testing/unittest/registar.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h index 231c2efe9c0..4d5352e5480 100644 --- a/library/cpp/testing/unittest/registar.h +++ b/library/cpp/testing/unittest/registar.h @@ -201,6 +201,10 @@ namespace NUnitTest { virtual void TearDown(); + virtual void GlobalSuiteSetUp() {} + + virtual void GlobalSuiteTearDown() {} + void AddError(const char* msg, const TString& backtrace = TString(), TTestContext* context = nullptr); void AddError(const char* msg, TTestContext* context); @@ -947,6 +951,7 @@ public: \ \ virtual void Execute() { \ this->AtStart(); \ + this->GlobalSuiteSetUp(); \ for (TTests::iterator it = Tests().begin(), ie = Tests().end(); it != ie; ++it) { \ const auto i = (*it)(); \ if (!this->CheckAccessTest(i->Name_)) { \ @@ -974,6 +979,7 @@ public: \ } \ this->Finish(i->Name_, &context); \ } \ + this->GlobalSuiteTearDown(); \ this->AtEnd(); \ } \ }; \ |
