Skip to content

Commit

Permalink
remove use of std::rand in FollyTest
Browse files Browse the repository at this point in the history
Summary: Fix linter complaint and make deterministic.

Reviewed By: yfeldblum

Differential Revision: D62766613

fbshipit-source-id: a1b66a7ee43dfd31dde42ba0a3374b8a7d70a84a
  • Loading branch information
jeevcat authored and facebook-github-bot committed Sep 17, 2024
1 parent 89ee274 commit 641f0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/memory/test/ArenaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ TEST(Arena, Clear) {
for (int i = 0; i < 10; ++i) {
std::vector<size_t> sizes(1000);
std::generate(sizes.begin(), sizes.end(), []() {
return std::rand() % blockSize * 2;
return Random::rand32(blockSize) * 2;
});

std::vector<void*> addresses;
Expand Down

0 comments on commit 641f0fb

Please sign in to comment.