ARC support for Object-C projects

This commit is contained in:
Phil Nash
2012-03-17 18:20:06 +00:00
parent 8d18d1648a
commit 53c990a7e1
9 changed files with 168 additions and 57 deletions

View File

@@ -639,6 +639,25 @@ public:
return *this;
}
///////////////////////////////////////////////////////////////////////////
template<typename MatcherT, typename ArgT>
ResultBuilder& acceptMatcher
(
const MatcherT& matcher,
ArgT* arg,
const std::string& matcherCallAsString
)
{
std::string matcherAsString = Catch::toString( matcher );
if( matcherAsString == "{?}" )
matcherAsString = matcherCallAsString;
m_result.setLhs( Catch::toString( arg ) );
m_result.setRhs( matcherAsString );
m_result.setOp( "matches" );
m_result.setResultType( matcher( arg ) ? ResultWas::Ok : ResultWas::ExpressionFailed );
return *this;
}
///////////////////////////////////////////////////////////////////////////
ResultBuilder& setResultType
(