From: <bl...@us...> - 2003-08-24 21:00:40
|
Update of /cvsroot/cpptool/rfta/src/pyrfta/test/rfta In directory sc8-pr-cvs1:/tmp/cvs-serv3499/src/pyrfta/test/rfta Modified Files: __init__.py alltests.py Removed Files: parser.py Log Message: * added C++ parser in python (without C++ template for the time being), as well as a load of tests. Index: __init__.py =================================================================== RCS file: /cvsroot/cpptool/rfta/src/pyrfta/test/rfta/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 30 May 2003 07:28:02 -0000 1.2 --- __init__.py 24 Aug 2003 21:00:36 -0000 1.3 *************** *** 1,20 **** ! from _pyrfta import * ! ! def _identifier_str( self ): ! return self.identifier ! ! def _declarator_str( self ): ! return self.type.typeText + ' ' + self.name.identifier + self.typeSuffix.typeText ! ! def _declarator_expr_str( self ): ! s = 'DeclarationExpr<' + self.primaryType.typeText + " " ! sep = '' ! for decl in self.getDeclarators(): ! s += sep ! s += str(decl) ! sep = ',' ! return s + '>' ! ! Declarator.__str__ = _declarator_str ! DeclaratorExpression.__repr__ = _declarator_expr_str ! Identifier.__str__ = _identifier_str \ No newline at end of file --- 1,22 ---- ! ##Commented out because dll are not compiled against Python 2.3 ! ## ! ##from _pyrfta import * ! ## ! ##def _identifier_str( self ): ! ## return self.identifier ! ## ! ##def _declarator_str( self ): ! ## return self.type.typeText + ' ' + self.name.identifier + self.typeSuffix.typeText ! ## ! ##def _declarator_expr_str( self ): ! ## s = 'DeclarationExpr<' + self.primaryType.typeText + " " ! ## sep = '' ! ## for decl in self.getDeclarators(): ! ## s += sep ! ## s += str(decl) ! ## sep = ',' ! ## return s + '>' ! ## ! ##Declarator.__str__ = _declarator_str ! ##DeclaratorExpression.__repr__ = _declarator_expr_str ! ##Identifier.__str__ = _identifier_str Index: alltests.py =================================================================== RCS file: /cvsroot/cpptool/rfta/src/pyrfta/test/rfta/alltests.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** alltests.py 31 Jul 2003 08:21:48 -0000 1.2 --- alltests.py 24 Aug 2003 21:00:36 -0000 1.3 *************** *** 9,14 **** import unittest ! import rfta.codeanalysistest ! import rfta.parsertest def suite(): --- 9,14 ---- import unittest ! #import rfta.codeanalysistest ! import parser.alltests def suite(): *************** *** 16,20 **** alltests = unittest.TestSuite() # alltests.addTest(unittest.findTestCases(rfta.codeanalysistest)) ! alltests.addTest(unittest.findTestCases(rfta.parsertest)) # for module in map(__import__, modules_to_test): # alltests.addTest(unittest.findTestCases(module)) --- 16,20 ---- alltests = unittest.TestSuite() # alltests.addTest(unittest.findTestCases(rfta.codeanalysistest)) ! alltests.addTest(parser.alltests.suite()) # for module in map(__import__, modules_to_test): # alltests.addTest(unittest.findTestCases(module)) *************** *** 23,24 **** --- 23,26 ---- #if __name__ == '__main__': # unittest.main(defaultTest='suite') + if __name__ == '__main__': + unittest.TextTestRunner().run(suite()) --- parser.py DELETED --- |