diff test/callback_suite/make-signatures.lua @ 517:f8856e29b512

- tests: made "ordered" signature generation code shareable, and added possibility to specify return types, separately (mainly to include 'void')
author Tassilo Philipp
date Mon, 11 Apr 2022 14:50:35 +0200
parents 1a813b706de4
children
line wrap: on
line diff
--- a/test/callback_suite/make-signatures.lua	Sun Apr 10 22:03:16 2022 +0200
+++ b/test/callback_suite/make-signatures.lua	Mon Apr 11 14:50:35 2022 +0200
@@ -9,26 +9,9 @@
 end
 
 
-function orderedSignature(x)
-  local signature = ""
-  local typeindex
-  local nargtypes = #types
-  while x >= nargtypes do
-    typeindex = 1 + (x % nargtypes)
-    signature = signature .. string.sub(types, typeindex, typeindex)
-    x = math.floor( x / nargtypes )
-  end
-  typeindex = 1 + x
-  signature = signature .. ")" .. string.sub(types, typeindex, typeindex)
-  return signature
-end
-
-
 function orderedSignatures()
-  local i 
-  for i = 0, ncases-1 do
-    io.write( orderedSignature(offset+i*step) .. "\n" )
-  end
+  package.path = '../common/?.lua;' .. package.path
+  require"ordered-sig"
 end