2007-06-26 Borut Razem <borut.razem AT siol.net>
- * support/regression/generate-cases.py: display warning if function list
- is empty
+ * support/regression/generate-cases.py: display warning if function
+ list is empty; implemented more flexible rule for detection of
+ testing functions, allowing return type 'void' in the same line as
+ the function name in the function definition
+ * support/regression/tests/bug-1654060.c: corrected test
2007-06-25 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
n = 0;
for fun in self.functions:
- # Turn the function definition into a pointer
- fun = re.sub(r'\(\w+\)', '', fun)
+ # Turn the function definition into a function call
fout.write(" __prints(\"Running " + fun + "\\n\");\n");
fout.write(' ' + fun + "();\n")
n += 1;
None
else:
# Pull out any test function names
- if re.search(r'^\W*test\w*\W*\(\W*void\W*\)', line) != None:
- self.functions.append(line)
+ m = re.match(r'^(?:\W*void\W+)?\W*(test\w*)\W*\(\W*void\W*\)', line)
+ if m != None:
+ self.functions.append(m.group(1))
def generate(self):
"""Main function. Generates all of the instances."""