mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Fixed Junit issue with REQUIRE_THROWS
- As mentioned by @SebDyn in GitHub issue #5
This commit is contained in:
@@ -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;
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user