[pygccxml-commit] SF.net SVN: pygccxml: [712] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-11-13 19:37:58
|
Revision: 712 http://svn.sourceforge.net/pygccxml/?rev=712&view=rev Author: roman_yakovenko Date: 2006-11-11 22:38:55 -0800 (Sat, 11 Nov 2006) Log Message: ----------- adding test case for inner class bug Modified Paths: -------------- pyplusplus_dev/unittests/test_all.py Added Paths: ----------- pyplusplus_dev/unittests/data/inner_class_bug_to_be_exported.hpp pyplusplus_dev/unittests/inner_class_bug_tester.py Added: pyplusplus_dev/unittests/data/inner_class_bug_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/inner_class_bug_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/inner_class_bug_to_be_exported.hpp 2006-11-12 06:38:55 UTC (rev 712) @@ -0,0 +1,27 @@ +// 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) + +#ifndef __inner_class_bug_to_be_exported_hpp__ +#define __inner_class_bug_to_be_exported_hpp__ + +namespace inner_classes { + +struct main_t{ + + void main_method(){} + virtual void main_method2(){} + virtual void main_method3() = 0; + + struct inner_t{ + inner_t( int ){} + void inner_method(){} + virtual void inner_method2(){} + virtual void inner_method3() = 0; + }; +}; + +} + +#endif//__inner_class_bug_to_be_exported_hpp__ Added: pyplusplus_dev/unittests/inner_class_bug_tester.py =================================================================== --- pyplusplus_dev/unittests/inner_class_bug_tester.py (rev 0) +++ pyplusplus_dev/unittests/inner_class_bug_tester.py 2006-11-12 06:38:55 UTC (rev 712) @@ -0,0 +1,34 @@ +# 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 + + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'inner_class_bug' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def run_tests( self, module): + main = module.main_t() + inner = module.main_t.inner_t( 12 ) + +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() Modified: pyplusplus_dev/unittests/test_all.py =================================================================== --- pyplusplus_dev/unittests/test_all.py 2006-11-11 19:12:12 UTC (rev 711) +++ pyplusplus_dev/unittests/test_all.py 2006-11-12 06:38:55 UTC (rev 712) @@ -65,6 +65,7 @@ import properties_tester import arrays_bug_tester import convenience_tester +import inner_class_bug_tester def create_suite(times): testers = [ @@ -126,6 +127,7 @@ , properties_tester , arrays_bug_tester , convenience_tester + , inner_class_bug_tester ] main_suite = unittest.TestSuite() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |