[pygccxml-commit] SF.net SVN: pygccxml: [1362] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2008-06-27 19:24:28
|
Revision: 1362
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1362&view=rev
Author: roman_yakovenko
Date: 2008-06-27 12:24:37 -0700 (Fri, 27 Jun 2008)
Log Message:
-----------
fixing small bug. for the following class
struct map_iterator_t{
map_iterator_t( int i ){}
map_iterator_t( const map_iterator_t& ){}
private:
map_iterator_t(){};
};
py++ generated wrong code
Modified Paths:
--------------
pygccxml_dev/unittests/copy_constructor_tester.py
pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp
pyplusplus_dev/unittests/ogre_generate_tester.py
pyplusplus_dev/unittests/test_all.py
Modified: pygccxml_dev/unittests/copy_constructor_tester.py
===================================================================
--- pygccxml_dev/unittests/copy_constructor_tester.py 2008-06-27 15:22:04 UTC (rev 1361)
+++ pygccxml_dev/unittests/copy_constructor_tester.py 2008-06-27 19:24:37 UTC (rev 1362)
@@ -19,7 +19,7 @@
def setUp(self):
if not self.global_ns:
- xml_file = os.path.join( autoconfig.data_directory, 'ogre1.4.xml' )
+ xml_file = os.path.join( autoconfig.data_directory, 'ogre.1.7.xml' )
reader = parser.source_reader_t( autoconfig.cxx_parsers_cfg.gccxml )
self.global_ns = declarations.get_global_namespace( reader.read_xml_file(xml_file) )
self.global_ns.init_optimizer()
Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2008-06-27 15:22:04 UTC (rev 1361)
+++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2008-06-27 19:24:37 UTC (rev 1362)
@@ -228,12 +228,14 @@
if cs and len(cs) == 1 and cs[0].is_trivial_constructor and self.declaration.find_noncopyable_vars():
has_suitable_constructor = False
+ trivial_constructor = self.declaration.find_trivial_constructor()
+
if has_nonpublic_destructor \
or ( self.declaration.is_abstract and not self.wrapper ) \
or not has_suitable_constructor:
result.append( ", " )
result.append( algorithm.create_identifier( self, '::boost::python::no_init' ) )
- elif not self.declaration.find_trivial_constructor():
+ elif not trivial_constructor or trivial_constructor.access_type != 'public':
if inits:
used_init = inits[0]
result.append( ", " )
Modified: pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp 2008-06-27 15:22:04 UTC (rev 1361)
+++ pyplusplus_dev/unittests/data/no_init_to_be_exported.hpp 2008-06-27 19:24:37 UTC (rev 1362)
@@ -48,6 +48,13 @@
event_t( TData& ){};
};
+struct map_iterator_t{
+ map_iterator_t( int i ){}
+ map_iterator_t( const map_iterator_t& ){}
+private:
+ map_iterator_t(){};
+};
+
}
#endif//__no_init_to_be_exported_hpp__
Modified: pyplusplus_dev/unittests/ogre_generate_tester.py
===================================================================
--- pyplusplus_dev/unittests/ogre_generate_tester.py 2008-06-27 15:22:04 UTC (rev 1361)
+++ pyplusplus_dev/unittests/ogre_generate_tester.py 2008-06-27 19:24:37 UTC (rev 1362)
@@ -24,7 +24,7 @@
messages.disable( *messages.all_warning_msgs )
ogre_file = autoconfig.data_directory.replace( 'pyplusplus_dev', 'pygccxml_dev' )
- ogre_file = parser.create_gccxml_fc( os.path.join( ogre_file, 'ogre1.4.xml' ) )
+ ogre_file = parser.create_gccxml_fc( os.path.join( ogre_file, 'ogre.1.7.xml' ) )
mb = module_builder.module_builder_t(
[ ogre_file ]
Modified: pyplusplus_dev/unittests/test_all.py
===================================================================
--- pyplusplus_dev/unittests/test_all.py 2008-06-27 15:22:04 UTC (rev 1361)
+++ pyplusplus_dev/unittests/test_all.py 2008-06-27 19:24:37 UTC (rev 1362)
@@ -105,6 +105,7 @@
import inner_tmpl_class_tester
import bug_covariant_returns_tester
import embeded_tester
+#import ogre_generate_tester
testers = [
algorithms_tester
@@ -197,6 +198,7 @@
, inner_tmpl_class_tester
, bug_covariant_returns_tester
, embeded_tester
+# , ogre_generate_tester too much time
]
class module_runner_t( object ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|