First cut of Matcher support

This commit is contained in:
Phil Nash
2012-03-04 11:14:21 +00:00
parent 5ff4ab0a76
commit eca5637c58
5 changed files with 100 additions and 6 deletions

View File

@@ -51,8 +51,8 @@ namespace Catch
m_filename( filename ),
m_line( line ),
m_expr( expr ),
m_lhs(),
m_rhs(),
m_lhs(),
m_rhs(),
m_op( isNotExpression( expr ) ? "!" : "" ),
m_message( message ),
m_result( result ),
@@ -157,6 +157,8 @@ namespace Catch
{
if( m_op == "" || m_isNot )
return m_lhs.empty() ? m_expr : m_op + m_lhs;
else if( m_op == "matches" )
return m_lhs + " " + m_rhs;
else if( m_op != "!" )
return m_lhs + " " + m_op + " " + m_rhs;
else