We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1a7f38e + 69f2088 commit b795babCopy full SHA for b795bab
src/mongo/platform/random_test.cpp
@@ -125,7 +125,7 @@ TEST(RandomTest, NextInt64SanityCheck) {
125
for (int bit = 0; bit < 64; bit++) {
126
int onesCount = 0;
127
for (size_t i = 0; i != nums.size(); ++i) {
128
- int32_t num = nums[i];
+ int64_t num = nums[i];
129
130
bool isSet = (num >> bit) & 1;
131
if (isSet)
@@ -149,7 +149,7 @@ TEST(RandomTest, NextInt32InRange) {
149
TEST(RandomTest, NextInt64InRange) {
150
PseudoRandom a(11);
151
for (int i = 0; i < 1000; i++) {
152
- int32_t res = a.nextInt64(10);
+ int64_t res = a.nextInt64(10);
153
ASSERT_GE(res, 0);
154
ASSERT_LT(res, 10);
155
}
0 commit comments