Allow to specify a random seed independently of whether shuffling is requested

This commit fixes issue #3681

Signed-off-by: Ayush Joshi <ayush854032@gmail.com>
This commit is contained in:
Ayush Joshi 2021-12-04 21:18:18 +05:30
parent d61d4d8e64
commit 3ea587050d

View File

@ -5835,9 +5835,7 @@ bool UnitTestImpl::RunAllTests() {
return true;
}
random_seed_ = GTEST_FLAG_GET(shuffle)
? GetRandomSeedFromFlag(GTEST_FLAG_GET(random_seed))
: 0;
random_seed_ = GetRandomSeedFromFlag(GTEST_FLAG_GET(random_seed));
// True if and only if at least one test has failed.
bool failed = false;