summaryrefslogtreecommitdiff
path: root/vendor/bandit/bandit/registration/registrar.h
blob: d57a1f46b4088afb903d4be4ef1a341a6a4045f3 (plain)
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
#ifndef BANDIT_REGISTRAR_H
#define BANDIT_REGISTRAR_H

namespace bandit { namespace detail {

    struct spec_registrar
    {
      spec_registrar( bandit::detail::voidfunc_t func)
      {
        bandit::detail::specs().push_back(func);
      }
    };

}}

#define go_bandit \
  static bandit::detail::spec_registrar bandit_registrar

#define SPEC_BEGIN(name)    \
go_bandit([]{

#define SPEC_END            \
});

#endif