Skip to content

Commit 3ea5870

Browse files
committed
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>
1 parent d61d4d8 commit 3ea5870

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

googletest/src/gtest.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5835,9 +5835,7 @@ bool UnitTestImpl::RunAllTests() {
58355835
return true;
58365836
}
58375837

5838-
random_seed_ = GTEST_FLAG_GET(shuffle)
5839-
? GetRandomSeedFromFlag(GTEST_FLAG_GET(random_seed))
5840-
: 0;
5838+
random_seed_ = GetRandomSeedFromFlag(GTEST_FLAG_GET(random_seed));
58415839

58425840
// True if and only if at least one test has failed.
58435841
bool failed = false;

0 commit comments

Comments
 (0)