aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_random_spec.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-03 15:37:17 +0100
committerKim Alvefur <zash@zash.se>2017-12-03 15:37:17 +0100
commit9ed1cb4bec66b03367c16b9e21a022b70415ba2d (patch)
tree81ad02ec1399db7b3db28709669e95ad9207ffd9 /spec/util_random_spec.lua
parent96d9651ece0aeb4045136c8c4e9f978eb1738334 (diff)
downloadprosody-9ed1cb4bec66b03367c16b9e21a022b70415ba2d.tar.gz
prosody-9ed1cb4bec66b03367c16b9e21a022b70415ba2d.zip
spec/util.random: Check a larger range of sizes
Diffstat (limited to 'spec/util_random_spec.lua')
-rw-r--r--spec/util_random_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/util_random_spec.lua b/spec/util_random_spec.lua
index e847d92e..c080a2c9 100644
--- a/spec/util_random_spec.lua
+++ b/spec/util_random_spec.lua
@@ -11,8 +11,8 @@ describe("util.random", function()
-- Makes no attempt at testing how random the bytes are,
-- just that it returns the number of bytes requested
- for i = 1, 255 do
- assert.are.equal(i, #random.bytes(i));
+ for i = 1, 20 do
+ assert.are.equal(2^i, #random.bytes(2^i));
end
end);
end);