#ifndef DOCTEST_PARTS_PUBLIC_DECORATORS
#define DOCTEST_PARTS_PUBLIC_DECORATORS

#include "doctest/parts/public/test_case.h"

#ifndef DOCTEST_CONFIG_DISABLE

namespace doctest {

#define DOCTEST_DEFINE_DECORATOR(name, type, def)                                                                      \
    struct name {                                                                                                      \
        type data;                                                                                                     \
        name(type in = def) noexcept                                                                                   \
            : data(in) {}                                                                                              \
        void fill(detail::TestCase &state) const noexcept {                                                            \
            state.DOCTEST_CAT(m_, name) = data;                                                                        \
        }                                                                                                              \
        void fill(detail::TestSuite &state) const noexcept {                                                           \
            state.DOCTEST_CAT(m_, name) = data;                                                                        \
        }                                                                                                              \
    }

DOCTEST_DEFINE_DECORATOR(test_suite, const char *, "");
DOCTEST_DEFINE_DECORATOR(description, const char *, "");
DOCTEST_DEFINE_DECORATOR(skip, bool, true);
DOCTEST_DEFINE_DECORATOR(no_breaks, bool, true);
DOCTEST_DEFINE_DECORATOR(no_output, bool, true);
DOCTEST_DEFINE_DECORATOR(timeout, double, 0);
DOCTEST_DEFINE_DECORATOR(may_fail, bool, true);
DOCTEST_DEFINE_DECORATOR(should_fail, bool, true);
DOCTEST_DEFINE_DECORATOR(expected_failures, int, 0);

} // namespace doctest

#endif // DOCTEST_CONFIG_DISABLE

#endif // DOCTEST_PARTS_PUBLIC_DECORATORS
