// Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 #pragma once #include #include #include #include namespace Catch { class IConfig; class ITestInvoker; class TestCaseHandle; class TestSpec; std::vector sortTests( IConfig const& config, std::vector const& unsortedTestCases ); bool isThrowSafe( TestCaseHandle const& testCase, IConfig const& config ); std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); std::vector const& getAllTestCasesSorted( IConfig const& config ); class TestRegistry final : public ITestCaseRegistry { public: void registerTest( Detail::unique_ptr testInfo, Detail::unique_ptr testInvoker ); void enableFilenameTags() override; std::vector const& getAllTests() const override; std::vector const& getAllTestsSorted( IConfig const& config ) const override; TestRegistry(); ~TestRegistry() override; // = default private: // Owns the test infos for handles std::vector> m_test_infos; // Owns the test invokers for handles std::vector> m_invokers; std::vector m_handles; mutable TestRunOrder m_currentSortOrder = TestRunOrder::Declared; mutable std::vector m_sortedFunctions; }; /////////////////////////////////////////////////////////////////////////// } // end namespace Catch