# HG changeset patch # User Kim Alvefur # Date 1512311837 -3600 # Node ID 3a9a3d90c44cfe369886964d61e3f1198ddb38ad # Parent b572a708fd41207051d18421c7fecd6622d8b353 spec/util.random: Check a larger range of sizes diff -r b572a708fd41 -r 3a9a3d90c44c spec/util_random_spec.lua --- 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);