Mercurial > pub > dyncall > dyncall
view test/call_suite/rand-sig.lua @ 431:1cb8a65ea27f
- test/call_suite: made seed configurable
author | Tassilo Philipp |
---|---|
date | Mon, 17 Jan 2022 17:35:21 +0100 |
parents | 3e629dc19168 |
children | 135c7fb49c2f |
line wrap: on
line source
require"config" rtypes = "v"..types math.randomseed(seed) local id for i = 1, ncases do id = math.random(#rtypes) local nargs = math.random(minargs,maxargs) local sig = { rtypes:sub(id,id)} for j = 1, nargs do id = math.random(#types) sig[#sig+1] = types:sub(id,id) end io.write(table.concat(sig)) io.write("\n") end