Compare commits

...

13 Commits

Author SHA1 Message Date
Phil Nash
981347b6e4 patch build to include last two fixes 2015-12-09 18:11:48 +00:00
Phil Nash
9e341231ba main takes args by non-const char*
- see #548
2015-12-09 06:22:15 +00:00
Phil Nash
2b688e1cef Initialise m_currentSortOrder
- as reported in #545
2015-12-09 06:15:52 +00:00
Phil Nash
84d1c080d6 Keep Xcode 7.1 happy 2015-12-04 10:21:07 +00:00
Phil Nash
722315a1f5 Removed some trailing whitespace 2015-12-04 10:20:33 +00:00
Phil Nash
fdc42d0af4 Merged from develop branch
- now v1.3.0
2015-12-04 10:19:08 +00:00
Phil Nash
d274fc571c Added noexcept to CustomStdException destructor 2015-11-20 17:09:48 +00:00
Phil Nash
d758428fe2 Merge pull request #523 from nabijaczleweli/patch-1
Fix typo in catch_stream.hpp
2015-10-26 14:47:29 +00:00
Jędrzej
bc00d59a4e Fix typo in catch_stream.hpp 2015-10-22 21:49:32 +02:00
Phil Nash
15317632f3 Revert "Fix parentheses warning on expression evaluation when using ccache"
This reverts commit 7da777a4b7.
2015-09-26 18:06:53 -07:00
Phil Nash
a28d40e941 Merge pull request #496 from segalaj/master
Fix parentheses warning on expression evaluation when using ccache
2015-09-18 08:12:56 +01:00
segalaj
7da777a4b7 Fix parentheses warning on expression evaluation when using ccache 2015-09-14 14:28:34 +02:00
Phil Nash
1dd0d4c61a Force cout/ cerr to be initialised before errors in test registry are printed
- see #461
2015-07-10 07:46:19 +01:00
10 changed files with 30 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
![catch logo](catch-logo-small.png) ![catch logo](catch-logo-small.png)
*v1.3.0-develop.4* *v1.3.1*
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch) Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)

View File

@@ -11,7 +11,7 @@
#ifndef __OBJC__ #ifndef __OBJC__
// Standard C/C++ main entry point // Standard C/C++ main entry point
int main (int argc, char * const argv[]) { int main (int argc, char * argv[]) {
return Catch::Session().run( argc, argv ); return Catch::Session().run( argc, argv );
} }

View File

@@ -19,7 +19,7 @@ namespace Catch {
struct IExceptionTranslator; struct IExceptionTranslator;
typedef std::vector<const IExceptionTranslator*> ExceptionTranslators; typedef std::vector<const IExceptionTranslator*> ExceptionTranslators;
struct IExceptionTranslator { struct IExceptionTranslator {
virtual ~IExceptionTranslator(); virtual ~IExceptionTranslator();
virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0; virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;

View File

@@ -17,7 +17,7 @@ namespace Matchers {
template<typename ExpressionT> class AnyOf; template<typename ExpressionT> class AnyOf;
template<typename ExpressionT> class Not; template<typename ExpressionT> class Not;
} }
template<typename ExpressionT> template<typename ExpressionT>
struct Matcher : SharedImpl<IShared> struct Matcher : SharedImpl<IShared>
{ {
@@ -27,7 +27,7 @@ namespace Matchers {
virtual Ptr<Matcher> clone() const = 0; virtual Ptr<Matcher> clone() const = 0;
virtual bool match( ExpressionT const& expr ) const = 0; virtual bool match( ExpressionT const& expr ) const = 0;
virtual std::string toString() const = 0; virtual std::string toString() const = 0;
Generic::AllOf<ExpressionT> operator && ( Matcher<ExpressionT> const& other ) const; Generic::AllOf<ExpressionT> operator && ( Matcher<ExpressionT> const& other ) const;
Generic::AnyOf<ExpressionT> operator || ( Matcher<ExpressionT> const& other ) const; Generic::AnyOf<ExpressionT> operator || ( Matcher<ExpressionT> const& other ) const;
Generic::Not<ExpressionT> operator ! () const; Generic::Not<ExpressionT> operator ! () const;
@@ -134,13 +134,13 @@ namespace Matchers {
anyOfExpr.add( other ); anyOfExpr.add( other );
return anyOfExpr; return anyOfExpr;
} }
private: private:
std::vector<Ptr<Matcher<ExpressionT> > > m_matchers; std::vector<Ptr<Matcher<ExpressionT> > > m_matchers;
}; };
} // namespace Generic } // namespace Generic
template<typename ExpressionT> template<typename ExpressionT>
Generic::AllOf<ExpressionT> Matcher<ExpressionT>::operator && ( Matcher<ExpressionT> const& other ) const { Generic::AllOf<ExpressionT> Matcher<ExpressionT>::operator && ( Matcher<ExpressionT> const& other ) const {
Generic::AllOf<ExpressionT> allOfExpr; Generic::AllOf<ExpressionT> allOfExpr;
@@ -161,7 +161,7 @@ namespace Matchers {
Generic::Not<ExpressionT> Matcher<ExpressionT>::operator ! () const { Generic::Not<ExpressionT> Matcher<ExpressionT>::operator ! () const {
return Generic::Not<ExpressionT>( *this ); return Generic::Not<ExpressionT>( *this );
} }
namespace StdString { namespace StdString {

View File

@@ -96,8 +96,7 @@ namespace Catch {
return m_os; return m_os;
} }
#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions
#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement this functions
std::ostream& cout() { std::ostream& cout() {
return std::cout; return std::cout;
} }

View File

@@ -87,7 +87,10 @@ namespace Catch {
class TestRegistry : public ITestCaseRegistry { class TestRegistry : public ITestCaseRegistry {
public: public:
TestRegistry() : m_unnamedCount( 0 ) {} TestRegistry()
: m_currentSortOrder( RunTests::InDeclarationOrder ),
m_unnamedCount( 0 )
{}
virtual ~TestRegistry(); virtual ~TestRegistry();
virtual void registerTest( TestCase const& testCase ) { virtual void registerTest( TestCase const& testCase ) {
@@ -157,7 +160,7 @@ namespace Catch {
char const* classOrQualifiedMethodName, char const* classOrQualifiedMethodName,
NameAndDesc const& nameAndDesc, NameAndDesc const& nameAndDesc,
SourceLineInfo const& lineInfo ) { SourceLineInfo const& lineInfo ) {
getMutableRegistryHub().registerTest getMutableRegistryHub().registerTest
( makeTestCase ( makeTestCase
( testCase, ( testCase,
@@ -172,7 +175,7 @@ namespace Catch {
NameAndDesc const& nameAndDesc ) { NameAndDesc const& nameAndDesc ) {
registerTestCase( new FreeFunctionTestCase( function ), "", nameAndDesc, lineInfo ); registerTestCase( new FreeFunctionTestCase( function ), "", nameAndDesc, lineInfo );
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
AutoReg::AutoReg AutoReg::AutoReg

View File

@@ -37,7 +37,7 @@ namespace Catch {
return os; return os;
} }
Version libraryVersion( 1, 3, 0, "develop", 4 ); Version libraryVersion( 1, 3, 1, "", 0 );
} }

View File

@@ -112,12 +112,13 @@ public:
CustomStdException( const std::string& msg ) CustomStdException( const std::string& msg )
: m_msg( msg ) : m_msg( msg )
{} {}
~CustomStdException() CATCH_NOEXCEPT {}
std::string getMessage() const std::string getMessage() const
{ {
return m_msg; return m_msg;
} }
private: private:
std::string m_msg; std::string m_msg;
}; };

View File

@@ -513,7 +513,7 @@
4A6D0C17149B3D3B00DB3EAA /* Project object */ = { 4A6D0C17149B3D3B00DB3EAA /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 0630; LastUpgradeCheck = 0710;
}; };
buildConfigurationList = 4A6D0C1A149B3D3B00DB3EAA /* Build configuration list for PBXProject "CatchSelfTest" */; buildConfigurationList = 4A6D0C1A149B3D3B00DB3EAA /* Build configuration list for PBXProject "CatchSelfTest" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
@@ -595,6 +595,7 @@
CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO; CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_ENABLE_OBJC_EXCEPTIONS = YES;

View File

@@ -1,6 +1,6 @@
/* /*
* Catch v1.3.0-develop.4 * Catch v1.3.1
* Generated: 2015-11-20 16:58:58.532767 * Generated: 2015-12-09 18:10:29.846134
* ---------------------------------------------------------- * ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly * This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -6248,7 +6248,10 @@ namespace Catch {
class TestRegistry : public ITestCaseRegistry { class TestRegistry : public ITestCaseRegistry {
public: public:
TestRegistry() : m_unnamedCount( 0 ) {} TestRegistry()
: m_currentSortOrder( RunTests::InDeclarationOrder ),
m_unnamedCount( 0 )
{}
virtual ~TestRegistry(); virtual ~TestRegistry();
virtual void registerTest( TestCase const& testCase ) { virtual void registerTest( TestCase const& testCase ) {
@@ -6627,7 +6630,7 @@ namespace Catch {
return m_os; return m_os;
} }
#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement this functions #ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions
std::ostream& cout() { std::ostream& cout() {
return std::cout; return std::cout;
} }
@@ -7267,7 +7270,7 @@ namespace Catch {
return os; return os;
} }
Version libraryVersion( 1, 3, 0, "develop", 4 ); Version libraryVersion( 1, 3, 1, "", 0 );
} }
@@ -10020,7 +10023,7 @@ namespace Catch {
#ifndef __OBJC__ #ifndef __OBJC__
// Standard C/C++ main entry point // Standard C/C++ main entry point
int main (int argc, char * const argv[]) { int main (int argc, char * argv[]) {
return Catch::Session().run( argc, argv ); return Catch::Session().run( argc, argv );
} }