// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#pragma once

#include <xrpl/beast/unit_test/suite_list.h>

namespace beast {
namespace unit_test {

namespace detail {

/// Holds test suites registered during static initialization.
inline suite_list&
global_suites()
{
    static suite_list s;
    return s;
}

template <class Suite>
struct insert_suite
{
    insert_suite(
        char const* name,
        char const* module,
        char const* library,
        bool manual,
        int priority)
    {
        global_suites().insert<Suite>(name, module, library, manual, priority);
    }
};

}  // namespace detail

/// Holds test suites registered during static initialization.
inline suite_list const&
global_suites()
{
    return detail::global_suites();
}

}  // namespace unit_test
}  // namespace beast
