comparison test/call_suite_aggrs/main.c @ 519:99819b874bac

test/call_suite_aggrs: - refactored generator code a bit to be simpler, write cleaner output, have better shareability and clarity - added rtypes w/ default value nil to config.lua, to self document - shared some code under test/common/ - fixed nonemptyaggrs sigs and cases.h (accidentally overwritten with cases having empty aggrs)
author Tassilo Philipp
date Mon, 11 Apr 2022 22:26:07 +0200
parents c9c546f8598b
children a2de1d0a73f3
comparison
equal deleted inserted replaced
518:a0ff5dff090b 519:99819b874bac
71 71
72 ++rtype; 72 ++rtype;
73 if(*rtype == '{' || *rtype == '<') { 73 if(*rtype == '{' || *rtype == '<') {
74 int i = find_agg_idx(NULL, rtype); 74 int i = find_agg_idx(NULL, rtype);
75 if(i == -1) { 75 if(i == -1) {
76 printf("unknown rtype sig at '%s' ;", rtype); 76 printf("unknown rtype aggr sig at '%s' ;", rtype);
77 return 0; 77 return 0;
78 } 78 }
79 79
80 rtype_size = G_agg_sizes[i]; 80 rtype_size = G_agg_sizes[i];
81 rtype_a_cmp = G_agg_cmpfuncs[i]; 81 rtype_a_cmp = G_agg_cmpfuncs[i];
106 /* find aggregate sig */ 106 /* find aggregate sig */
107 int len; 107 int len;
108 DCaggr *ag; 108 DCaggr *ag;
109 int i = find_agg_idx(&len, sig); 109 int i = find_agg_idx(&len, sig);
110 if(i == -1) { 110 if(i == -1) {
111 printf("unknown sig at '%s' ;", sig); 111 printf("unknown aggr sig at '%s' ;", sig);
112 return 0; 112 return 0;
113 } 113 }
114 ag = ((DCaggr*(*)())G_agg_touchdcstfuncs[i])(); 114 ag = ((DCaggr*(*)())G_agg_touchdcstfuncs[i])();
115 dcArgAggr(p, ag, K_a[pos]); 115 dcArgAggr(p, ag, K_a[pos]);
116 sig += len-1; /* advance to next arg char */ 116 sig += len-1; /* advance to next arg char */