[pygccxml-commit] source/pygccxml/unittests decl_printer_tester.py,NONE,1.1
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman <rom...@us...> - 2006-03-06 05:00:38
|
Update of /cvsroot/pygccxml/source/pygccxml/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7137/pygccxml/unittests Added Files: decl_printer_tester.py Log Message: Removing DeclPrinter class from experemental folder. Now there are 2 printers: decl_printer_t and decl_wrapper_printer_t --- NEW FILE: decl_printer_tester.py --- # Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import unittest import autoconfig import parser_test_case from pygccxml import parser from pygccxml import declarations class tester_t( parser_test_case.parser_test_case_t ): def __init__(self, *args): parser_test_case.parser_test_case_t.__init__(self, *args) self.__files = [ 'core_ns_join_1.hpp' , 'core_ns_join_2.hpp' , 'core_ns_join_3.hpp' , 'core_membership.hpp' , 'core_class_hierarchy.hpp' , 'core_types.hpp' , 'core_diamand_hierarchy_base.hpp' , 'core_diamand_hierarchy_derived1.hpp' , 'core_diamand_hierarchy_derived2.hpp' , 'core_diamand_hierarchy_final_derived.hpp' , 'core_overloads_1.hpp' , 'core_overloads_2.hpp' ] def test(self): prj_reader = parser.project_reader_t( self.config ) prj_decls = prj_reader.read_files( self.__files , compilation_mode=parser.COMPILATION_MODE.FILE_BY_FILE ) writer = lambda decl: None declarations.print_declarations( prj_decls, writer=writer ) def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t)) return suite def run_suite(): unittest.TextTestRunner(verbosity=2).run( create_suite() ) if __name__ == "__main__": run_suite() |