mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
dev build 2
This commit is contained in:
parent
d87e551efa
commit
8f66e3495b
@ -1,6 +1,6 @@
|
||||
![catch logo](catch-logo-small.png)
|
||||
|
||||
*v1.2.1-develop.1*
|
||||
*v1.2.1-develop.2*
|
||||
|
||||
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace Catch {
|
||||
return os;
|
||||
}
|
||||
|
||||
Version libraryVersion( 1, 2, 1, "develop", 1 );
|
||||
Version libraryVersion( 1, 2, 1, "develop", 2 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Catch v1.2.1-develop.1
|
||||
* Generated: 2015-07-02 08:21:11.983471
|
||||
* Catch v1.2.1-develop.2
|
||||
* Generated: 2015-07-02 23:02:49.715552
|
||||
* ----------------------------------------------------------
|
||||
* This file has been merged from multiple headers. Please don't edit it directly
|
||||
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
||||
@ -233,6 +233,8 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct IConfig;
|
||||
|
||||
class NonCopyable {
|
||||
#ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
||||
NonCopyable( NonCopyable const& ) = delete;
|
||||
@ -319,6 +321,9 @@ namespace Catch {
|
||||
|
||||
void throwLogicError( std::string const& message, SourceLineInfo const& locationInfo );
|
||||
|
||||
void seedRng( IConfig const& config );
|
||||
unsigned int rngSeed();
|
||||
|
||||
// Use this in variadic streaming macros to allow
|
||||
// >> +StreamEndStop
|
||||
// as well as
|
||||
@ -5388,6 +5393,8 @@ namespace Catch {
|
||||
m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal );
|
||||
TestCaseTracker::Guard guard( *m_testCaseTracker );
|
||||
|
||||
seedRng( *m_config );
|
||||
|
||||
Timer timer;
|
||||
timer.start();
|
||||
if( m_reporter->getPreferences().shouldRedirectStdOut ) {
|
||||
@ -5697,7 +5704,7 @@ namespace Catch {
|
||||
if( m_configData.filenamesAsTags )
|
||||
applyFilenamesAsTags();
|
||||
|
||||
std::srand( m_configData.rngSeed );
|
||||
seedRng( *m_config );
|
||||
|
||||
Runner runner( m_config );
|
||||
|
||||
@ -5822,6 +5829,8 @@ namespace Catch {
|
||||
break;
|
||||
case RunTests::InRandomOrder:
|
||||
{
|
||||
seedRng( config );
|
||||
|
||||
RandomNumberGenerator rng;
|
||||
std::random_shuffle( matchingTestCases.begin(), matchingTestCases.end(), rng );
|
||||
}
|
||||
@ -6812,7 +6821,7 @@ namespace Catch {
|
||||
return os;
|
||||
}
|
||||
|
||||
Version libraryVersion( 1, 2, 1, "develop", 1 );
|
||||
Version libraryVersion( 1, 2, 1, "develop", 2 );
|
||||
|
||||
}
|
||||
|
||||
@ -7104,6 +7113,14 @@ namespace Catch {
|
||||
return line < other.line || ( line == other.line && file < other.file );
|
||||
}
|
||||
|
||||
void seedRng( IConfig const& config ) {
|
||||
if( config.rngSeed() != 0 )
|
||||
std::srand( config.rngSeed() );
|
||||
}
|
||||
unsigned int rngSeed() {
|
||||
return getCurrentContext().getConfig()->rngSeed();
|
||||
}
|
||||
|
||||
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {
|
||||
#ifndef __GNUG__
|
||||
os << info.file << "(" << info.line << ")";
|
||||
|
Loading…
Reference in New Issue
Block a user