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 #include <memory>
13 
14 namespace Catch {
15 
16     class TestSpec;
17 
18     struct ITestInvoker {
19         virtual void invoke () const = 0;
20         virtual ~ITestInvoker();
21     };
22 
23     using ITestCasePtr = std::shared_ptr<ITestInvoker>;
24 
25     class TestCase;
26     struct IConfig;
27 
28     struct ITestCaseRegistry {
29         virtual ~ITestCaseRegistry();
30         virtual std::vector<TestCase> const& getAllTests() const = 0;
31         virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;
32     };
33 
34     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
35     std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );
36     std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );
37 
38 }
39 
40 #endif // TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED
41