summaryrefslogtreecommitdiff
path: root/src/unittest/test_random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittest/test_random.cpp')
-rw-r--r--src/unittest/test_random.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unittest/test_random.cpp b/src/unittest/test_random.cpp
index 20cfca334..bbee57719 100644
--- a/src/unittest/test_random.cpp
+++ b/src/unittest/test_random.cpp
@@ -101,6 +101,9 @@ void TestRandom::testPcgRandomRange()
EXCEPTION_CHECK(PrngException, pr.range(5, 1));
+ // Regression test for bug 3027
+ pr.range(pr.RANDOM_MIN, pr.RANDOM_MAX);
+
for (u32 i = 0; i != 32768; i++) {
int min = (pr.next() % 3000) - 500;
int max = (pr.next() % 3000) - 500;