Mercurial > pub > dyncall > dyncall
diff test/call_suite/mk-cases.lua @ 514:01f928eb9584
- more test code generator code sharing
author | Tassilo Philipp |
---|---|
date | Sun, 10 Apr 2022 16:18:28 +0200 |
parents | 4d0541bf9b38 |
children |
line wrap: on
line diff
--- a/test/call_suite/mk-cases.lua Sun Apr 10 16:10:10 2022 +0200 +++ b/test/call_suite/mk-cases.lua Sun Apr 10 16:18:28 2022 +0200 @@ -1,8 +1,13 @@ require"math" + +-- use shared helpers to generate cases +package.path = '../common/?.lua;' .. package.path +require"mk-cases" + + local max = math.max local maxargs = 0 -function trim(l) return l:gsub("^%s+",""):gsub("%s+$","") end function mkcase(id,sig) local sig = trim(sig) local h = { "/* ",id,":",sig," */ ",sig:sub(-1), " f", id,"(","" } @@ -22,11 +27,6 @@ return table.concat(h,"")..table.concat(t,"") end --- use shared helpers to generate cases -package.path = '../common/?.lua;' .. package.path -require"mk-cases" - - function mkall() local lineno = 0 local sigtab = { }