[pygccxml-commit] SF.net SVN: pygccxml: [1084] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2007-07-09 06:03:15
|
Revision: 1084 http://svn.sourceforge.net/pygccxml/?rev=1084&view=rev Author: roman_yakovenko Date: 2007-07-08 23:03:16 -0700 (Sun, 08 Jul 2007) Log Message: ----------- adding new "final class" test case Added Paths: ----------- pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp pyplusplus_dev/unittests/final_classes_tester.py Added: pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp (rev 0) +++ pyplusplus_dev/unittests/data/final_classes_to_be_exported.hpp 2007-07-09 06:03:16 UTC (rev 1084) @@ -0,0 +1,24 @@ +// 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 __final_classes_to_be_exported_hpp__ +#define __final_classes_to_be_exported_hpp__ + +#include <string> + +namespace final_classes{ + +class Foo{ +public: + virtual void bar() {} +private: + Foo() {} +}; + + +} + +#endif//__final_classes_to_be_exported_hpp__ + Added: pyplusplus_dev/unittests/final_classes_tester.py =================================================================== --- pyplusplus_dev/unittests/final_classes_tester.py (rev 0) +++ pyplusplus_dev/unittests/final_classes_tester.py 2007-07-09 06:03:16 UTC (rev 1084) @@ -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 +from pyplusplus.module_builder import call_policies + +class tester_t(fundamental_tester_base.fundamental_tester_base_t): + EXTENSION_NAME = 'final_classes' + + def __init__( self, *args ): + fundamental_tester_base.fundamental_tester_base_t.__init__( + self + , tester_t.EXTENSION_NAME + , *args ) + + def customize(self, mb ): + mb.namespace( 'final_classes' ).include() + mb.mem_fun('bar').virtuality = declarations.FUNCTION_VIRTUALITY_TYPES.NOT_VIRTUAL + + 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() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |