Add generateRandomSeed utility to generate randomness seed

This commit is contained in:
Martin Hořeňovský
2021-10-08 20:02:24 +02:00
parent fce42b62ad
commit 200a487cf2
14 changed files with 184 additions and 8 deletions

View File

@@ -9383,6 +9383,42 @@ Misc.tests.cpp:<line number>: PASSED:
with expansion:
1 >= 1
-------------------------------------------------------------------------------
Random seed generation accepts known methods
-------------------------------------------------------------------------------
RandomNumberGeneration.tests.cpp:<line number>
...............................................................................
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( Catch::generateRandomSeed(method) )
-------------------------------------------------------------------------------
Random seed generation accepts known methods
-------------------------------------------------------------------------------
RandomNumberGeneration.tests.cpp:<line number>
...............................................................................
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( Catch::generateRandomSeed(method) )
-------------------------------------------------------------------------------
Random seed generation accepts known methods
-------------------------------------------------------------------------------
RandomNumberGeneration.tests.cpp:<line number>
...............................................................................
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( Catch::generateRandomSeed(method) )
-------------------------------------------------------------------------------
Random seed generation reports unknown methods
-------------------------------------------------------------------------------
RandomNumberGeneration.tests.cpp:<line number>
...............................................................................
RandomNumberGeneration.tests.cpp:<line number>: PASSED:
REQUIRE_THROWS( Catch::generateRandomSeed(static_cast<Catch::GenerateFrom>(77)) )
-------------------------------------------------------------------------------
Range type with sentinel
-------------------------------------------------------------------------------
@@ -16954,6 +16990,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 369 | 277 passed | 86 failed | 6 failed as expected
assertions: 2123 | 1954 passed | 146 failed | 23 failed as expected
test cases: 371 | 279 passed | 86 failed | 6 failed as expected
assertions: 2127 | 1958 passed | 146 failed | 23 failed as expected