diff --git a/tests/lib/catch.hpp b/tests/lib/catch.hpp index 31745154..8bbc0a5b 100644 --- a/tests/lib/catch.hpp +++ b/tests/lib/catch.hpp @@ -1,7 +1,6 @@ -// SPDX-License-Identifier: BSL-1.0 /* - * Catch v2.13.3 - * Generated: 2020-10-31 18:20:31.045274 + * Catch v2.13.4 + * Generated: 2020-12-29 14:48:00.116107 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved. @@ -16,7 +15,7 @@ #define CATCH_VERSION_MAJOR 2 #define CATCH_VERSION_MINOR 13 -#define CATCH_VERSION_PATCH 3 +#define CATCH_VERSION_PATCH 4 #ifdef __clang__ # pragma clang system_header @@ -10820,8 +10819,12 @@ namespace Catch { // 32kb for the alternate stack seems to be sufficient. However, this value // is experimentally determined, so that's not guaranteed. - static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; + //static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; + // Since glibc 2.33.9000 MINSIGSTKSZ is no more a constant. So, + // let's hardwire this for now as suggested by + // https://github.com/catchorg/Catch2/issues/2178. + static constexpr std::size_t sigStackSize = 32768; static SignalDefs signalDefs[] = { { SIGINT, "SIGINT - Terminal interrupt signal" }, { SIGILL, "SIGILL - Illegal instruction signal" }, @@ -14127,24 +14130,28 @@ namespace Catch { namespace { struct TestHasher { - explicit TestHasher(Catch::SimplePcg32& rng_instance) { - basis = rng_instance(); - basis <<= 32; - basis |= rng_instance(); - } + using hash_t = uint64_t; - uint64_t basis; + explicit TestHasher( hash_t hashSuffix ): + m_hashSuffix{ hashSuffix } {} - uint64_t operator()(TestCase const& t) const { - // Modified FNV-1a hash - static constexpr uint64_t prime = 1099511628211; - uint64_t hash = basis; - for (const char c : t.name) { + uint32_t operator()( TestCase const& t ) const { + // FNV-1a hash with multiplication fold. + const hash_t prime = 1099511628211u; + hash_t hash = 14695981039346656037u; + for ( const char c : t.name ) { hash ^= c; hash *= prime; } - return hash; + hash ^= m_hashSuffix; + hash *= prime; + const uint32_t low{ static_cast( hash ) }; + const uint32_t high{ static_cast( hash >> 32 ) }; + return low * high; } + + private: + hash_t m_hashSuffix; }; } // end unnamed namespace @@ -14162,9 +14169,9 @@ namespace Catch { case RunTests::InRandomOrder: { seedRng( config ); - TestHasher h( rng() ); + TestHasher h{ config.rngSeed() }; - using hashedTest = std::pair; + using hashedTest = std::pair; std::vector indexed_tests; indexed_tests.reserve( unsortedTestCases.size() ); @@ -15317,7 +15324,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 13, 3, "", 0 ); + static Version version( 2, 13, 4, "", 0 ); return version; }