aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/unittest/plugin.h
blob: 102f2c1469eb5614209a4aa3d89f10bb900cc8f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include <util/generic/ptr.h>

namespace NUnitTest {
    // Plugins are deprecated, please use Y_TEST_HOOK_* from library/cpp/hook/hook.h
    namespace NPlugin {
        class IPlugin {
        public:
            virtual ~IPlugin() {
            }

            virtual void OnStartMain(int /*argc*/, char* /*argv*/ []) {
            }

            virtual void OnStopMain(int /*argc*/, char* /*argv*/ []) {
            }
        };

        void OnStartMain(int argc, char* argv[]);
        void OnStopMain(int argc, char* argv[]);

        class TPluginRegistrator {
        public:
            TPluginRegistrator(TSimpleSharedPtr<IPlugin> plugin);
        };

    }
}