[pygccxml-commit] source/pyplusplus/unittests algorithms_tester.py,1.8,1.9
Brought to you by:
mbaas,
roman_yakovenko
From: Roman <rom...@us...> - 2006-03-02 07:07:17
|
Update of /cvsroot/pygccxml/source/pyplusplus/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8933/pyplusplus/unittests Modified Files: algorithms_tester.py Log Message: Index: algorithms_tester.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/unittests/algorithms_tester.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** algorithms_tester.py 28 Feb 2006 08:06:08 -0000 1.8 --- algorithms_tester.py 2 Mar 2006 07:07:13 -0000 1.9 *************** *** 23,29 **** def test(self): config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) ! mb = module_builder.module_builder_t( 'dummy' ! , ['namespace enums{ enum { OK=1 }; }'] ! , config ) flatten = code_creators.make_flatten(mb.module_creator.creators) self.failUnless( filter( lambda inst: isinstance( inst, code_creators.unnamed_enum_t ), flatten ) ) --- 23,31 ---- def test(self): config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) ! mb = module_builder.module_builder_t( ! 'dummy' ! , [ parser.create_text_fc( 'namespace enums{ enum { OK=1 }; }' )] ! , config ) ! mb.namespace( name='::enums' ).include() flatten = code_creators.make_flatten(mb.module_creator.creators) self.failUnless( filter( lambda inst: isinstance( inst, code_creators.unnamed_enum_t ), flatten ) ) *************** *** 32,50 **** def test_find_by_declaration(self): config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) ! decls = parser.parse_string( 'namespace enums{ enum color{ red = 1}; }', config ) ! extmodule = module_creator.create( decls=decls, module_name='dummy' ) ! enum_matcher = declarations.match_declaration_t( name='color' ) ! enum_found = code_creators.creator_finder.find_by_declaration( enum_matcher ! , extmodule.creators ) self.failUnless( enum_found ) def test_find_by_class_instance(self): config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) ! decls = parser.parse_string( 'namespace enums{ enum color{ red = 1}; }', config ) ! extmodule = module_creator.create( decls=decls, module_name='dummy' ) enum_found = code_creators.creator_finder.find_by_class_instance( code_creators.enum_t ! , extmodule.creators , recursive=True) self.failUnless( enum_found ) --- 34,58 ---- def test_find_by_declaration(self): config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) ! mb = module_builder.module_builder_t( ! 'dummy' ! , [ parser.create_text_fc( 'namespace enums{ enum color{ red = 1}; }' )] ! , config ) ! mb.namespace( name='::enums' ).include() enum_matcher = declarations.match_declaration_t( name='color' ) ! enum_found = code_creators.creator_finder.find_by_declaration( ! enum_matcher ! , mb.module_creator.creators ) self.failUnless( enum_found ) def test_find_by_class_instance(self): config = parser.config_t( gccxml_path=autoconfig.gccxml_path ) ! mb = module_builder.module_builder_t( ! 'dummy' ! , [ parser.create_text_fc( 'namespace enums{ enum color{ red = 1}; }' )] ! , config ) ! mb.namespace( name='::enums' ).include() enum_found = code_creators.creator_finder.find_by_class_instance( code_creators.enum_t ! , mb.module_creator.creators , recursive=True) self.failUnless( enum_found ) |