catch_interfaces_testcase.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #include <vector>
  11. namespace Catch {
  12. class TestSpec;
  13. struct ITestInvoker {
  14. virtual void invoke () const = 0;
  15. virtual ~ITestInvoker();
  16. };
  17. class TestCase;
  18. struct IConfig;
  19. struct ITestCaseRegistry {
  20. virtual ~ITestCaseRegistry();
  21. virtual std::vector<TestCase> const& getAllTests() const = 0;
  22. virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;
  23. };
  24. bool isThrowSafe( TestCase const& testCase, IConfig const& config );
  25. bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
  26. std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );
  27. std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );
  28. }
  29. #endif // TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED