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 
9 #include "catch_result_type.h"
10 
11 namespace Catch {
12 
isOk(ResultWas::OfType resultType)13     bool isOk( ResultWas::OfType resultType ) {
14         return ( resultType & ResultWas::FailureBit ) == 0;
15     }
isJustInfo(int flags)16     bool isJustInfo( int flags ) {
17         return flags == ResultWas::Info;
18     }
19 
operator |(ResultDisposition::Flags lhs,ResultDisposition::Flags rhs)20     ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) {
21         return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );
22     }
23 
shouldContinueOnFailure(int flags)24     bool shouldContinueOnFailure( int flags )    { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; }
shouldSuppressFailure(int flags)25     bool shouldSuppressFailure( int flags )      { return ( flags & ResultDisposition::SuppressFail ) != 0; }
26 
27 } // end namespace Catch
28