diff test/call_suite_aggrs/mk-cases.lua @ 526:93628a1eaed4

tests: integrate new tests into makefiles, some cleanups
author Tassilo Philipp
date Thu, 14 Apr 2022 10:06:58 +0200
parents f7fec6699e21
children ed8835abe05f
line wrap: on
line diff
--- a/test/call_suite_aggrs/mk-cases.lua	Wed Apr 13 15:55:50 2022 +0200
+++ b/test/call_suite_aggrs/mk-cases.lua	Thu Apr 14 10:06:58 2022 +0200
@@ -14,7 +14,7 @@
   local sig = trim(sig)
   local fsig = put_sig_rtype_first(sig)
   local h = { "/* ",id,":",sig," */ " }
-  local t = { "" }
+  local t = { }
   local pos = -1
   local n_nest = 0
   local aggr = { }
@@ -25,7 +25,6 @@
     local name = "a"..pos
     local ch   = fsig:sub(i,i)
 
-
     -- aggregate nest level change?
     if ch == '{' or ch == '<' then
       n_nest = n_nest + 1
@@ -64,11 +63,11 @@
       if n_nest == 0 then
         h[#h+1] = ch
         -- aggregate types have more than one char
-        if #h[#h] > 1 then
+        if #ch > 1 then
           if aggrcpsimple then
-            t[#t+1] = '*('..h[#h]..'*)V_a['..pos.."]="..name..";"
+            t[#t+1] = '*('..ch..'*)V_a['..pos.."]="..name..";"
           else
-            t[#t+1] = 'f_cp'..h[#h]:match('A.*')..'(V_a['..pos.."],&"..name..");"
+            t[#t+1] = 'f_cp'..ch:match('A.*')..'(V_a['..pos.."],&"..name..");"
           end
           if aggrmutabletest then
             t[#t] = t[#t]..'memset(&'..name..',0,sizeof('..name..'));'