diff tests/test_util_random.lua @ 7179:bfa3b2ee384c

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 22 Feb 2016 15:24:20 +0100
parents 32b74ad54432
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test_util_random.lua	Mon Feb 22 15:24:20 2016 +0100
@@ -0,0 +1,10 @@
+-- Makes no attempt at testing how random the bytes are,
+-- just that it returns the number of bytes requested
+
+function bytes(bytes)
+	assert_is(bytes(16));
+
+	for i = 1, 255 do
+		assert_equal(i, #bytes(i));
+	end
+end