Fixed Junit issue with REQUIRE_THROWS

- As mentioned by @SebDyn in GitHub issue #5
This commit is contained in:
Phil Nash
2013-04-08 12:05:32 +01:00
parent 8764177c0e
commit 3bd4241795
3 changed files with 9 additions and 13 deletions

View File

@@ -155,18 +155,10 @@ namespace Catch {
if( _stats.infoMessages.size() > 1 )
messageLabel = "explicitly with messages";
break;
case ResultWas::Exception:
passOrFail = "FAILED";
colour = Colour::Error;
if( _stats.infoMessages.size() == 1 )
messageLabel = "with message";
if( _stats.infoMessages.size() > 1 )
messageLabel = "with messages";
break;
// These cases are here to prevent compiler warnings
case ResultWas::Unknown:
case ResultWas::FailureBit:
case ResultWas::Exception:
passOrFail = "** internal error **";
colour = Colour::Error;
break;

View File

@@ -143,10 +143,14 @@ namespace Catch {
case ResultWas::Ok:
stats.m_element = "success";
break;
case ResultWas::DidntThrowException:
stats.m_element = "failure";
m_currentStats->m_failuresCount++;
break;
case ResultWas::Unknown:
case ResultWas::FailureBit:
case ResultWas::Exception:
case ResultWas::DidntThrowException:
stats.m_element = "* internal error *";
break;
}
testCaseStats.m_testStats.push_back( stats );