11/*
2- * Catch v2.13.3
3- * Generated: 2020-10-31 18:20:31.045274
2+ * Catch v2.13.4
3+ * Generated: 2020-12-29 14:48:00.116107
44 * ----------------------------------------------------------
55 * This file has been merged from multiple headers. Please don't edit it directly
66 * Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved.
1515
1616#define CATCH_VERSION_MAJOR 2
1717#define CATCH_VERSION_MINOR 13
18- #define CATCH_VERSION_PATCH 3
18+ #define CATCH_VERSION_PATCH 4
1919
2020#ifdef __clang__
2121# pragma clang system_header
@@ -14126,24 +14126,28 @@ namespace Catch {
1412614126
1412714127 namespace {
1412814128 struct TestHasher {
14129- explicit TestHasher(Catch::SimplePcg32& rng_instance) {
14130- basis = rng_instance();
14131- basis <<= 32;
14132- basis |= rng_instance();
14133- }
14129+ using hash_t = uint64_t;
1413414130
14135- uint64_t basis;
14131+ explicit TestHasher( hash_t hashSuffix ):
14132+ m_hashSuffix{ hashSuffix } {}
1413614133
14137- uint64_t operator()(TestCase const& t) const {
14138- // Modified FNV-1a hash
14139- static constexpr uint64_t prime = 1099511628211 ;
14140- uint64_t hash = basis ;
14141- for (const char c : t.name) {
14134+ uint32_t operator()( TestCase const& t ) const {
14135+ // FNV-1a hash with multiplication fold.
14136+ const hash_t prime = 1099511628211u ;
14137+ hash_t hash = 14695981039346656037u ;
14138+ for ( const char c : t.name ) {
1414214139 hash ^= c;
1414314140 hash *= prime;
1414414141 }
14145- return hash;
14142+ hash ^= m_hashSuffix;
14143+ hash *= prime;
14144+ const uint32_t low{ static_cast<uint32_t>( hash ) };
14145+ const uint32_t high{ static_cast<uint32_t>( hash >> 32 ) };
14146+ return low * high;
1414614147 }
14148+
14149+ private:
14150+ hash_t m_hashSuffix;
1414714151 };
1414814152 } // end unnamed namespace
1414914153
@@ -14161,9 +14165,9 @@ namespace Catch {
1416114165
1416214166 case RunTests::InRandomOrder: {
1416314167 seedRng( config );
14164- TestHasher h( rng () ) ;
14168+ TestHasher h{ config.rngSeed () } ;
1416514169
14166- using hashedTest = std::pair<uint64_t , TestCase const*>;
14170+ using hashedTest = std::pair<TestHasher::hash_t , TestCase const*>;
1416714171 std::vector<hashedTest> indexed_tests;
1416814172 indexed_tests.reserve( unsortedTestCases.size() );
1416914173
@@ -15316,7 +15320,7 @@ namespace Catch {
1531615320 }
1531715321
1531815322 Version const& libraryVersion() {
15319- static Version version( 2, 13, 3 , "", 0 );
15323+ static Version version( 2, 13, 4 , "", 0 );
1532015324 return version;
1532115325 }
1532215326
0 commit comments