Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_result_type.h
Go to the documentation of this file.
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_RESULT_TYPE_H_INCLUDED
9#define TWOBLUECUBES_CATCH_RESULT_TYPE_H_INCLUDED
10
11namespace Catch {
12
13 // ResultWas::OfType enum
14 struct ResultWas { enum OfType {
15 Unknown = -1,
16 Ok = 0,
17 Info = 1,
19
20 FailureBit = 0x10,
21
24
25 Exception = 0x100 | FailureBit,
26
27 ThrewException = Exception | 1,
28 DidntThrowException = Exception | 2,
29
31
32 }; };
33
34 bool isOk( ResultWas::OfType resultType );
35 bool isJustInfo( int flags );
36
37
38 // ResultDisposition::Flags enum
39 struct ResultDisposition { enum Flags {
40 Normal = 0x01,
41
42 ContinueOnFailure = 0x02, // Failures fail test, but execution continues
43 FalseTest = 0x04, // Prefix expression with !
44 SuppressFail = 0x08 // Failures are reported but do not fail the test
45 }; };
46
48
50 inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; }
51 bool shouldSuppressFailure( int flags );
52
53} // end namespace Catch
54
55#endif // TWOBLUECUBES_CATCH_RESULT_TYPE_H_INCLUDED
bool isOk(ResultWas::OfType resultType)
bool isJustInfo(int flags)
bool shouldContinueOnFailure(int flags)
bool isFalseTest(int flags)
ResultDisposition::Flags operator|(ResultDisposition::Flags lhs, ResultDisposition::Flags rhs)
bool shouldSuppressFailure(int flags)
pInfo flags