view tests/test_util_random.lua @ 7312:b4e99602ae75

util.sql: Charset should be innocent until proven guilty (initialize charset_ok to true), fixes bug introduced in 187ba2e9c012
author Matthew Wild <mwild1@gmail.com>
date Wed, 23 Mar 2016 12:17:28 +0000
parents 32b74ad54432
children
line wrap: on
line source

-- 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