This commit is contained in:
Phil Nash 2014-09-18 18:25:10 +01:00
parent b62a1b5334
commit ee3b265aa1
3 changed files with 20 additions and 16 deletions

View File

@ -1,6 +1,6 @@
![catch logo](catch-logo-small.png) ![catch logo](catch-logo-small.png)
*v1.1 build 4 (develop branch)* *v1.1 build 5 (develop branch)*
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

@ -13,7 +13,7 @@
namespace Catch { namespace Catch {
// These numbers are maintained by a script // These numbers are maintained by a script
Version libraryVersion( 1, 1, 4, "develop" ); Version libraryVersion( 1, 1, 5, "develop" );
} }
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED

View File

@ -1,6 +1,6 @@
/* /*
* CATCH v1.1 build 4 (develop branch) * CATCH v1.1 build 5 (develop branch)
* Generated: 2014-09-15 23:36:12.995567 * Generated: 2014-09-18 18:24:52.876757
* ---------------------------------------------------------- * ----------------------------------------------------------
* 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.
@ -135,12 +135,12 @@
// Visual C++ // Visual C++
#ifdef _MSC_VER #ifdef _MSC_VER
#if (_MSC_VER >= 1310 ) // (VC++ 7.0+) #if (_MSC_VER >= 1600)
//#define CATCH_CONFIG_SFINAE // Not confirmed #define CATCH_CONFIG_CPP11_NULLPTR
#endif #endif
#if (_MSC_VER >= 1400) #if (_MSC_VER >= 1310 ) // (VC++ 7.0+)
#define CATCH_CONFIG_CPP11_NULLPTR //#define CATCH_CONFIG_SFINAE // Not confirmed
#endif #endif
#endif // _MSC_VER #endif // _MSC_VER
@ -5641,6 +5641,13 @@ namespace Catch {
namespace Catch { namespace Catch {
class TestRegistry : public ITestCaseRegistry { class TestRegistry : public ITestCaseRegistry {
struct LexSort {
bool operator() (TestCase i,TestCase j) const { return (i<j);}
};
struct RandomNumberGenerator {
int operator()( int n ) const { return std::rand() % n; }
};
public: public:
TestRegistry() : m_unnamedCount( 0 ) {} TestRegistry() : m_unnamedCount( 0 ) {}
virtual ~TestRegistry(); virtual ~TestRegistry();
@ -5680,12 +5687,6 @@ namespace Catch {
} }
virtual void getFilteredTests( TestSpec const& testSpec, IConfig const& config, std::vector<TestCase>& matchingTestCases ) const { virtual void getFilteredTests( TestSpec const& testSpec, IConfig const& config, std::vector<TestCase>& matchingTestCases ) const {
struct LexSort {
bool operator() (TestCase i,TestCase j) const { return (i<j);}
};
struct RandomNumberGenerator {
int operator()( int n ) const { return std::rand() % n; }
};
for( std::vector<TestCase>::const_iterator it = m_functionsInOrder.begin(), for( std::vector<TestCase>::const_iterator it = m_functionsInOrder.begin(),
itEnd = m_functionsInOrder.end(); itEnd = m_functionsInOrder.end();
@ -5699,7 +5700,10 @@ namespace Catch {
std::sort( matchingTestCases.begin(), matchingTestCases.end(), LexSort() ); std::sort( matchingTestCases.begin(), matchingTestCases.end(), LexSort() );
break; break;
case RunTests::InRandomOrder: case RunTests::InRandomOrder:
std::random_shuffle( matchingTestCases.begin(), matchingTestCases.end(), RandomNumberGenerator() ); {
RandomNumberGenerator rng;
std::random_shuffle( matchingTestCases.begin(), matchingTestCases.end(), rng );
}
break; break;
case RunTests::InDeclarationOrder: case RunTests::InDeclarationOrder:
// already in declaration order // already in declaration order
@ -6636,7 +6640,7 @@ namespace Catch {
namespace Catch { namespace Catch {
// These numbers are maintained by a script // These numbers are maintained by a script
Version libraryVersion( 1, 1, 4, "develop" ); Version libraryVersion( 1, 1, 5, "develop" );
} }
// #included from: catch_message.hpp // #included from: catch_message.hpp