summaryrefslogtreecommitdiffstats
path: root/base/rand_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/rand_util_unittest.cc')
-rw-r--r--base/rand_util_unittest.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/rand_util_unittest.cc b/base/rand_util_unittest.cc
index f56c0ec..cbc338a 100644
--- a/base/rand_util_unittest.cc
+++ b/base/rand_util_unittest.cc
@@ -27,3 +27,11 @@ TEST(RandUtilTest, RandDouble) {
EXPECT_GT(1.0, number);
EXPECT_LE(0.0, number);
}
+
+// Make sure that it is still appropriate to use RandGenerator in conjunction
+// with std::random_shuffle().
+TEST(RandUtilTest, RandGeneratorForRandomShuffle) {
+ EXPECT_EQ(base::RandGenerator(1), 0U);
+ EXPECT_LE(std::numeric_limits<ptrdiff_t>::max(),
+ std::numeric_limits<int64>::max());
+}