1 /* 2 * Created by Phil on 07/01/2011. 3 * Copyright 2011 Two Blue Cubes Ltd. All rights reserved. 4 * 5 * Distributed under the Boost Software License, Version 1.0. (See accompanying 6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 */ 8 #ifndef TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED 9 #define TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED 10 11 #include <vector> 12 13 namespace Catch { 14 15 class TestSpec; 16 17 struct ITestInvoker { 18 virtual void invoke () const = 0; 19 virtual ~ITestInvoker(); 20 }; 21 22 class TestCase; 23 struct IConfig; 24 25 struct ITestCaseRegistry { 26 virtual ~ITestCaseRegistry(); 27 virtual std::vector<TestCase> const& getAllTests() const = 0; 28 virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0; 29 }; 30 31 bool isThrowSafe( TestCase const& testCase, IConfig const& config ); 32 bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); 33 std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config ); 34 std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config ); 35 36 } 37 38 #endif // TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED 39