Changeset

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 8449:b572a708fd41
children 8451:770f79a9635c
files spec/util_random_spec.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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);