1 /* 2 * Created by Phil on 05/06/2012. 3 * Copyright 2012 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_CONFIG_H_INCLUDED 9 #define TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED 10 11 #include <iostream> 12 #include <string> 13 #include <vector> 14 15 #include "catch_ptr.hpp" 16 17 namespace Catch { 18 19 struct Verbosity { enum Level { 20 NoOutput = 0, 21 Quiet, 22 Normal 23 }; }; 24 25 struct WarnAbout { enum What { 26 Nothing = 0x00, 27 NoAssertions = 0x01 28 }; }; 29 30 struct ShowDurations { enum OrNot { 31 DefaultForReporter, 32 Always, 33 Never 34 }; }; 35 struct RunTests { enum InWhatOrder { 36 InDeclarationOrder, 37 InLexicographicalOrder, 38 InRandomOrder 39 }; }; 40 struct UseColour { enum YesOrNo { 41 Auto, 42 Yes, 43 No 44 }; }; 45 46 class TestSpec; 47 48 struct IConfig : IShared { 49 50 virtual ~IConfig(); 51 52 virtual bool allowThrows() const = 0; 53 virtual std::ostream& stream() const = 0; 54 virtual std::string name() const = 0; 55 virtual bool includeSuccessfulResults() const = 0; 56 virtual bool shouldDebugBreak() const = 0; 57 virtual bool warnAboutMissingAssertions() const = 0; 58 virtual int abortAfter() const = 0; 59 virtual bool showInvisibles() const = 0; 60 virtual ShowDurations::OrNot showDurations() const = 0; 61 virtual TestSpec const& testSpec() const = 0; 62 virtual RunTests::InWhatOrder runOrder() const = 0; 63 virtual unsigned int rngSeed() const = 0; 64 virtual UseColour::YesOrNo useColour() const = 0; 65 virtual std::vector<std::string> const& getSectionsToRun() const = 0; 66 67 }; 68 } 69 70 #endif // TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED 71