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 <iosfwd>
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     struct WaitForKeypress { enum When {
46         Never,
47         BeforeStart = 1,
48         BeforeExit = 2,
49         BeforeStartAndExit = BeforeStart | BeforeExit
50     }; };
51 
52     class TestSpec;
53 
54     struct IConfig : IShared {
55 
56         virtual ~IConfig();
57 
58         virtual bool allowThrows() const = 0;
59         virtual std::ostream& stream() const = 0;
60         virtual std::string name() const = 0;
61         virtual bool includeSuccessfulResults() const = 0;
62         virtual bool shouldDebugBreak() const = 0;
63         virtual bool warnAboutMissingAssertions() const = 0;
64         virtual int abortAfter() const = 0;
65         virtual bool showInvisibles() const = 0;
66         virtual ShowDurations::OrNot showDurations() const = 0;
67         virtual TestSpec const& testSpec() const = 0;
68         virtual RunTests::InWhatOrder runOrder() const = 0;
69         virtual unsigned int rngSeed() const = 0;
70         virtual UseColour::YesOrNo useColour() const = 0;
71         virtual std::vector<std::string> const& getSectionsToRun() const = 0;
72 
73     };
74 }
75 
76 #endif // TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED
77