Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2013-04-08 12:05:32 +0100
committerPhil Nash2013-04-08 12:05:32 +0100
commit3bd42417952e5065cd1ccebc1d6cdd0dbe6c4812 (patch)
treeea8d667cd2b4e002acb2185677600862dc588274 /include
parent8764177c0e85512f3f0315c67b7a52fa6d8c6423 (diff)
downloadcatch3-3bd42417952e5065cd1ccebc1d6cdd0dbe6c4812.tar.gz
Fixed Junit issue with REQUIRE_THROWS
- As mentioned by @SebDyn in GitHub issue #5
Diffstat (limited to 'include')
-rw-r--r--include/reporters/catch_reporter_console.hpp10
-rw-r--r--include/reporters/catch_reporter_junit.hpp6
2 files changed, 6 insertions, 10 deletions
diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp
index cb50436d..9cd25e89 100644
--- a/include/reporters/catch_reporter_console.hpp
+++ b/include/reporters/catch_reporter_console.hpp
@@ -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;
diff --git a/include/reporters/catch_reporter_junit.hpp b/include/reporters/catch_reporter_junit.hpp
index af43b3b7..7e2f4b2b 100644
--- a/include/reporters/catch_reporter_junit.hpp
+++ b/include/reporters/catch_reporter_junit.hpp
@@ -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 );