[pygccxml-commit] SF.net SVN: pygccxml: [1183] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2007-12-03 19:35:33
|
Revision: 1183 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1183&view=rev Author: roman_yakovenko Date: 2007-12-03 11:35:37 -0800 (Mon, 03 Dec 2007) Log Message: ----------- adding new unittest for constructor declarations Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_creators/calldef.py pyplusplus_dev/unittests/test_all.py Added Paths: ----------- pyplusplus_dev/unittests/constructors_bug_tester.py pyplusplus_dev/unittests/data/constructors_bug_to_be_exported.hpp Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-12-02 20:48:27 UTC (rev 1182) +++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2007-12-03 19:35:37 UTC (rev 1183) @@ -126,7 +126,7 @@ if not self.works_on_instance: #indenting and adding scope code = ''.join( result ) - result = [ '{ //%s' % self.decl_identifier ] + result = [ '{ //%s' % declarations.full_name( self.declaration ) ] result.append( os.linesep * 2 ) result.append( self.indent( code ) ) result.append( os.linesep * 2 ) Added: pyplusplus_dev/unittests/constructors_bug_tester.py =================================================================== --- pyplusplus_dev/unittests/constructors_bug_tester.py (rev 0) +++ pyplusplus_dev/unittests/constructors_bug_tester.py 2007-12-03 19:35:37 UTC (rev 1183) @@ -0,0 +1,33 @@ +# 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 os +import sys +import unittest +import fundamental_tester_base +from pyplusplus import code_creators + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'constructors_bug' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def run_tests( self, module): + pass + +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() Added: pyplusplus_dev/unittests/data/constructors_bug_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/constructors_bug_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/constructors_bug_to_be_exported.hpp 2007-12-03 19:35:37 UTC (rev 1183) @@ -0,0 +1,28 @@ +// Copyright 2004-2007 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) + +#ifndef __constructors_bug_to_be_exported_hpp__ +#define __constructors_bug_to_be_exported_hpp__ + +struct Joint{}; +struct Actor{}; + +class JointCallback { +public: + + class JointBreakCallback { + public: + virtual void onBreak(Joint*, float, Actor*, Actor*) {} + }; + + void onBreak(Joint* j, float impulse, Actor* a, Actor* b) { + mCallback->onBreak(j,impulse, a,b); + } + + JointBreakCallback* mCallback; +}; + + +#endif//__constructors_bug_to_be_exported_hpp__ Modified: pyplusplus_dev/unittests/test_all.py =================================================================== --- pyplusplus_dev/unittests/test_all.py 2007-12-02 20:48:27 UTC (rev 1182) +++ pyplusplus_dev/unittests/test_all.py 2007-12-03 19:35:37 UTC (rev 1183) @@ -95,10 +95,10 @@ import unicode_bug import include_exclude_bug_tester import vector_with_shared_data_tester +import constructors_bug_tester - testers = [ algorithms_tester , module_body_tester @@ -180,6 +180,7 @@ , include_exclude_bug_tester , vector_with_shared_data_tester , templates_tester + , constructors_bug_tester ] class module_runner_t( object ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |