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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-06-05 17:19:42 +0200
committerMartin Hořeňovský2017-06-05 17:19:42 +0200
commit7f6773bb4d4bcdb7858e63f906e8a80e746bea7e (patch)
tree947fb02bfb2c860cffd6b08c29b461f17bf3c64d /include/internal
parentb459bb4c431670cb3031a68f4b3cf79f631d0c48 (diff)
parent3e018ef131878f32950d3622300e282c1c8a6594 (diff)
downloadcatch3-7f6773bb4d4bcdb7858e63f906e8a80e746bea7e.tar.gz
Merge branch 'master' into dev-modernize
Hopefully nothing went too wrong.
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/catch_assertionresult.h4
-rw-r--r--include/internal/catch_default_main.hpp8
-rw-r--r--include/internal/catch_fatal_condition.hpp4
-rw-r--r--include/internal/catch_objc.hpp2
-rw-r--r--include/internal/catch_run_context.hpp7
-rw-r--r--include/internal/catch_xmlwriter.hpp2
6 files changed, 16 insertions, 11 deletions
diff --git a/include/internal/catch_assertionresult.h b/include/internal/catch_assertionresult.h
index 24ab4f62..3f7bc7af 100644
--- a/include/internal/catch_assertionresult.h
+++ b/include/internal/catch_assertionresult.h
@@ -33,8 +33,8 @@ namespace Catch {
template<typename T> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( T const& );
template<typename T> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( T const& );
- private:
- DecomposedExpression& operator = (DecomposedExpression const&);
+ private:
+ DecomposedExpression& operator = (DecomposedExpression const&);
};
struct AssertionInfo
diff --git a/include/internal/catch_default_main.hpp b/include/internal/catch_default_main.hpp
index a0c4239d..e9f466c0 100644
--- a/include/internal/catch_default_main.hpp
+++ b/include/internal/catch_default_main.hpp
@@ -10,9 +10,15 @@
#ifndef __OBJC__
+#if defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)
+// Standard C/C++ Win32 Unicode wmain entry point
+extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {
+#else
// Standard C/C++ main entry point
int main (int argc, char * argv[]) {
- int result = Catch::Session().run( argc, argv );
+#endif
+
+ int result = Catch::Session().run( argc, argv );
return ( result < 0xff ? result : 0xff );
}
diff --git a/include/internal/catch_fatal_condition.hpp b/include/internal/catch_fatal_condition.hpp
index 810d9e0f..26903fe7 100644
--- a/include/internal/catch_fatal_condition.hpp
+++ b/include/internal/catch_fatal_condition.hpp
@@ -28,7 +28,7 @@ namespace Catch {
namespace Catch {
struct FatalConditionHandler {
- void reset() {}
+ void reset() {}
};
}
@@ -106,7 +106,7 @@ namespace Catch {
namespace Catch {
struct FatalConditionHandler {
- void reset() {}
+ void reset() {}
};
}
diff --git a/include/internal/catch_objc.hpp b/include/internal/catch_objc.hpp
index baded73e..30237ac4 100644
--- a/include/internal/catch_objc.hpp
+++ b/include/internal/catch_objc.hpp
@@ -104,7 +104,7 @@ namespace Catch {
namespace Matchers {
namespace Impl {
namespace NSStringMatchers {
-
+
struct StringHolder : MatcherBase<NSString*>{
StringHolder( NSString* substr ) : m_substr( [substr copy] ){}
StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){}
diff --git a/include/internal/catch_run_context.hpp b/include/internal/catch_run_context.hpp
index d262f78c..375d8cb6 100644
--- a/include/internal/catch_run_context.hpp
+++ b/include/internal/catch_run_context.hpp
@@ -142,8 +142,9 @@ namespace Catch {
m_totals.assertions.failed++;
}
- if( m_reporter->assertionEnded( AssertionStats( result, m_messages, m_totals ) ) )
- m_messages.clear();
+ // We have no use for the return value (whether messages should be cleared), because messages were made scoped
+ // and should be let to clear themselves out.
+ static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals)));
// Reset working state
m_lastAssertionInfo = AssertionInfo( std::string(), m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition );
@@ -296,7 +297,7 @@ namespace Catch {
// This just means the test was aborted due to failure
}
catch(...) {
- // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions
+ // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions
// are reported without translation at the point of origin.
if (m_shouldReportUnexpected) {
makeUnexpectedResultBuilder().useActiveException();
diff --git a/include/internal/catch_xmlwriter.hpp b/include/internal/catch_xmlwriter.hpp
index 0b951c71..35ae1648 100644
--- a/include/internal/catch_xmlwriter.hpp
+++ b/include/internal/catch_xmlwriter.hpp
@@ -10,7 +10,6 @@
#include "catch_stream.h"
#include "catch_compiler_capabilities.h"
-#include "catch_suppress_warnings.h"
#include <sstream>
#include <string>
@@ -230,6 +229,5 @@ namespace Catch {
};
}
-#include "catch_reenable_warnings.h"
#endif // TWOBLUECUBES_CATCH_XMLWRITER_HPP_INCLUDED