Revision: 1343
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1343&view=rev
Author: roman_yakovenko
Date: 2008-06-23 13:23:05 -0700 (Mon, 23 Jun 2008)
Log Message:
-----------
updating type_traits functionality
Modified Paths:
--------------
pygccxml_dev/unittests/type_traits_tester.py
Modified: pygccxml_dev/unittests/type_traits_tester.py
===================================================================
--- pygccxml_dev/unittests/type_traits_tester.py 2008-06-23 20:16:33 UTC (rev 1342)
+++ pygccxml_dev/unittests/type_traits_tester.py 2008-06-23 20:23:05 UTC (rev 1343)
@@ -42,11 +42,16 @@
self.failUnless( controller( decl.type )
, 'for type "%s" the answer to the question "%s" should be True'
% ( decl.type.decl_string, ns_name ) )
+ elif isinstance( decl, declarations.calldef_t ) and decl.name.startswith( 'test_' ):
+ continue
else:
self.failUnless( controller( decl )
, 'for type "%s" the answer to the question "%s" should be True'
% ( decl.decl_string, ns_name ) )
for decl in ns_no.declarations:
+ if isinstance( decl, declarations.calldef_t ) and decl.name.startswith( 'test_' ):
+ continue
+
self.failIf( controller( decl )
, 'for type "%s" the answer to the question "%s" should be False'
% ( decl.decl_string, ns_name ) )
@@ -234,9 +239,21 @@
for tester in filter( lambda decl: decl.name.startswith( 'x' ), ns_is_convertible.declarations ):
self.__is_convertible_impl( tester )
+class missing_decls_tester_t(unittest.TestCase):
+ def __init__(self, *args ):
+ unittest.TestCase.__init__(self, *args)
+ def test( self ):
+ config = autoconfig.cxx_parsers_cfg.gccxml
+ code = "struct const_item{ const int values[10]; };"
+ global_ns = parser.parse_string( code , config )[0]
+ ci = global_ns.class_( 'const_item' )
+ self.failUnless( len( ci.declarations ) == 5 )
+ #constructor, copy constructor, destructor, operator=, variable
+
def create_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite(tester_t))
+ suite.addTest( unittest.makeSuite(missing_decls_tester_t))
return suite
def run_suite():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|