summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAyush Joshi <ayush854032@gmail.com>2021-12-04 15:48:18 (GMT)
committerAyush Joshi <ayush854032@gmail.com>2021-12-04 15:48:18 (GMT)
commit3ea587050da9447536d0b55fece0a240273d9927 (patch)
treed0c158c5ef25cba867c37e51162720f1c258eb1d
parentd61d4d8e64c08a662055e82904bbf90e108a704f (diff)
downloadgoogletest-3ea587050da9447536d0b55fece0a240273d9927.zip
googletest-3ea587050da9447536d0b55fece0a240273d9927.tar.gz
googletest-3ea587050da9447536d0b55fece0a240273d9927.tar.bz2
Allow to specify a random seed independently of whether shuffling is requestedrefs/pull/3694/head
This commit fixes issue #3681 Signed-off-by: Ayush Joshi <ayush854032@gmail.com>
-rw-r--r--googletest/src/gtest.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 103c445..d1ccd17 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -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;