Function AutoReg

Synopsis

#include <include/internal/catch_test_registry.h>

AutoReg(ITestInvoker *invoker, SourceLineInfo const &lineInfo, StringRef const &classOrMethod, NameAndTags const &nameAndTags) noexcept

Description

No description yet.

Source

Lines 21-34 in include/internal/catch_test_registry.cpp. Line 46 in include/internal/catch_test_registry.h.

AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept {
    CATCH_TRY {
        getMutableRegistryHub()
                .registerTest(
                    makeTestCase(
                        invoker,
                        extractClassName( classOrMethod ),
                        nameAndTags,
                        lineInfo));
    } CATCH_CATCH_ALL {
        // Do not throw when constructing global objects, instead register the exception to be processed later
        getMutableRegistryHub().registerStartupException();
    }
}





Add Discussion as Guest

Log in