From f2bea43f564daffc657e2b30cad3b044bd2cb7c7 Mon Sep 17 00:00:00 2001 From: arcadia-devtools Date: Wed, 16 Mar 2022 12:44:45 +0300 Subject: intermediate changes ref:d483e9e2fc8bfef633904bd3103470d44e8d0eb4 --- library/cpp/testing/unittest/registar.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'library/cpp/testing') 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(); \ } \ }; \ -- cgit v1.3