File indexing completed on 2025-01-18 09:54:06
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CATCH_RESULT_TYPE_HPP_INCLUDED
0009 #define CATCH_RESULT_TYPE_HPP_INCLUDED
0010
0011 namespace Catch {
0012
0013
0014 struct ResultWas { enum OfType {
0015 Unknown = -1,
0016 Ok = 0,
0017 Info = 1,
0018 Warning = 2,
0019
0020 ExplicitSkip = 4,
0021
0022 FailureBit = 0x10,
0023
0024 ExpressionFailed = FailureBit | 1,
0025 ExplicitFailure = FailureBit | 2,
0026
0027 Exception = 0x100 | FailureBit,
0028
0029 ThrewException = Exception | 1,
0030 DidntThrowException = Exception | 2,
0031
0032 FatalErrorCondition = 0x200 | FailureBit
0033
0034 }; };
0035
0036 bool isOk( ResultWas::OfType resultType );
0037 bool isJustInfo( int flags );
0038
0039
0040
0041 struct ResultDisposition { enum Flags {
0042 Normal = 0x01,
0043
0044 ContinueOnFailure = 0x02,
0045 FalseTest = 0x04,
0046 SuppressFail = 0x08
0047 }; };
0048
0049 ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs );
0050
0051 bool shouldContinueOnFailure( int flags );
0052 inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; }
0053 bool shouldSuppressFailure( int flags );
0054
0055 }
0056
0057 #endif