[pygccxml-commit] SF.net SVN: pygccxml: [83] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-05-14 07:46:02
|
Revision: 83 Author: roman_yakovenko Date: 2006-05-14 00:45:53 -0700 (Sun, 14 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=83&view=rev Log Message: ----------- adding exception specification to function-wrappers Added Paths: ----------- pyplusplus_dev/unittests/data/mem_fun_with_exception_to_be_exported.hpp pyplusplus_dev/unittests/mem_fun_with_exception_tester.py Added: pyplusplus_dev/unittests/data/mem_fun_with_exception_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/mem_fun_with_exception_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/mem_fun_with_exception_to_be_exported.hpp 2006-05-14 07:45:53 UTC (rev 83) @@ -0,0 +1,23 @@ +// 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 __mem_fun_with_exception_to_be_exported_hpp__ +#define __mem_fun_with_exception_to_be_exported_hpp__ + +#include <exception> + +namespace mem_fun_with_exception{ + +struct data_t{ +public: + virtual void do_nothing() throw( std::exception ) + {} +}; + +} + +#endif//__mem_fun_with_exception_to_be_exported_hpp__ + + Added: pyplusplus_dev/unittests/mem_fun_with_exception_tester.py =================================================================== --- pyplusplus_dev/unittests/mem_fun_with_exception_tester.py (rev 0) +++ pyplusplus_dev/unittests/mem_fun_with_exception_tester.py 2006-05-14 07:45:53 UTC (rev 83) @@ -0,0 +1,38 @@ +# 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 pygccxml import declarations + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'mem_fun_with_exception' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def customize( self, mb ): + mb.calldefs().create_with_signature = True + + def run_tests(self, module): + d = module.data_t() + d.do_nothing() + + +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() \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |