diff options
| author | Martin Hořeňovský | 2022-05-17 17:57:15 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-05-17 17:57:21 +0200 |
| commit | 7a2a6c632feb7d6e438671b8520beb80efd60ad2 (patch) | |
| tree | a2ed263dca51619468153ee267e81419496b41e8 /src/catch2/generators/catch_generators_random.cpp | |
| parent | 359cd6187d7e8fe40dec82e77bafe5066115cb53 (diff) | |
| download | catch3-7a2a6c632feb7d6e438671b8520beb80efd60ad2.tar.gz | |
Make Random*Generators be seedable
This is a necessary step to fix issue with combining multiple
random generators in one test case, with different section nesting.
Diffstat (limited to 'src/catch2/generators/catch_generators_random.cpp')
| -rw-r--r-- | src/catch2/generators/catch_generators_random.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/catch2/generators/catch_generators_random.cpp b/src/catch2/generators/catch_generators_random.cpp new file mode 100644 index 00000000..57ad1745 --- /dev/null +++ b/src/catch2/generators/catch_generators_random.cpp @@ -0,0 +1,13 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/generators/catch_generators_random.hpp> + +#include <catch2/internal/catch_context.hpp> + +std::uint32_t Catch::Generators::Detail::getSeed() { return sharedRng()(); } |