Mercurial > prosody-hg
diff spec/util_random_spec.lua @ 8450:3a9a3d90c44c
spec/util.random: Check a larger range of sizes
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 03 Dec 2017 15:37:17 +0100 |
| parents | 4878e4159e12 |
| children |
line wrap: on
line diff
--- a/spec/util_random_spec.lua Sun Dec 03 15:36:20 2017 +0100 +++ b/spec/util_random_spec.lua Sun Dec 03 15:37:17 2017 +0100 @@ -11,8 +11,8 @@ -- 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);
