Fresco/Fresco-Test/syunit syn2cc.py,1.3,1.4
Nathaniel Smith <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Fresco-Test/syunit
In directory purcel:/tmp/cvs-serv14902
Modified Files:
syn2cc.py
Log Message:
Fix a few stupid bugs, and remove some debugging code.
Index: syn2cc.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Test/syunit/syn2cc.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- syn2cc.py 19 Feb 2003 20:47:06 -0000 1.3
+++ syn2cc.py 2 Apr 2003 22:46:14 -0000 1.4
@@ -35,7 +35,7 @@
ignore_methods = ("set_up", "tear_down")
"""Illegal test names."""
-bad_names = ("all")
+bad_names = ("all",)
test_file_tmpl = """\
/* This file was automatically generated. Do not edit! */
@@ -108,12 +108,12 @@
# figure out if this class inherits from base_class
# probably this will broken on embedded classes -- how do we tell when
# we exit a class scope?
- file_name = node.file()
+ file_name = node.file().filename()
class_name = "::".join(node.name())
parent_names = [n.parent().name() for n in node.parents()]
- print "Parent names of class %s (in %s): %s" % (class_name,
- file_name,
- `parent_names`)
+ #print "Parent names of class %s (in %s): %s" % (class_name,
+ # file_name,
+ # `parent_names`)
if self.base_class in parent_names:
#print "Ah-hah, gotcha!"
self.in_test_class = 1
@@ -184,8 +184,9 @@
if len(sys.argv) != 3:
usage()
return
-# fill_template_from_ast(AST.load(sys.argv[1]), open(sys.argv[2], "w"))
- fill_template_from_ast(AST.load(sys.argv[1]), sys.stdout)
+ fill_template_from_ast(AST.load(sys.argv[1]), open(sys.argv[2], "w"))
+# useful for debugging:
+# fill_template_from_ast(AST.load(sys.argv[1]), sys.stdout)
if __name__ == "__main__":
main()