def METHOD_NAME(self):
    if not self.fname.endswith('.test'):
        sys.stderr.write('ERROR: filename %s must end with .test\n' % self.fname)
        sys.exit(1);
    self.c_file = open(re.sub('[.]test', '.c', self.fname), "w")
    self.line_num = 0
    for line in open(self.fname):
        self.line_num += 1
        if self.match(r'TEST\s+(\w*).*', line):
            self.test_test(self.m.group(1))
        elif self.match(r'(?:#include)\s+.*', line):
            self.test_hdr(line)
        elif self.match(r'(?:#if|#ifdef)\s+.*', line):
            self.test_if(line)
        elif self.match(r'#endif.*', line):
            self.test_endif(line)
        elif self.match(r'{\s*(.*)', line):
            self.test_open_brace()
        elif self.match(r'MAIN\s+(\w*).*', line):
            self.test_main(self.m.group(1))
        elif self.match(r'}.*', line):
            self.test_close_brace()
        else:
            self.test_body(line)
    self.test_fi()
    self.test_boilerplate()
    self.c_file.close()
    self.c_file = False