[pygccxml-commit] SF.net SVN: pygccxml: [725] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-11-13 19:46:25
|
Revision: 725 http://svn.sourceforge.net/pygccxml/?rev=725&view=rev Author: roman_yakovenko Date: 2006-11-13 11:23:28 -0800 (Mon, 13 Nov 2006) Log Message: ----------- integrating return_pointee_value call policies - unit tests Modified Paths: -------------- pyplusplus_dev/unittests/call_policies_tester.py pyplusplus_dev/unittests/data/call_policies_to_be_exported.cpp pyplusplus_dev/unittests/data/call_policies_to_be_exported.hpp Modified: pyplusplus_dev/unittests/call_policies_tester.py =================================================================== --- pyplusplus_dev/unittests/call_policies_tester.py 2006-11-13 19:00:19 UTC (rev 724) +++ pyplusplus_dev/unittests/call_policies_tester.py 2006-11-13 19:23:28 UTC (rev 725) @@ -29,6 +29,12 @@ mb.calldef( 'get_opaque' ).call_policies \ = call_policies.return_value_policy( call_policies.return_opaque_pointer ) + mb.calldef( 'get_fundamental_ptr_value' ).call_policies \ + = call_policies.return_value_policy( call_policies.return_pointee_value ) + + mb.calldef( 'get_fundamental_ptr_value_null' ).call_policies \ + = call_policies.return_value_policy( call_policies.return_pointee_value ) + def run_tests(self, module): self.failUnless( module.compare( module.my_address() ) ) @@ -45,6 +51,10 @@ cont = module.container() self.failUnless( 1977 == cont[1977] ) + self.failUnless( 0.5 == module.get_fundamental_ptr_value() ) + + self.failUnless( None is module.get_fundamental_ptr_value_null() ) + module.get_impl_details() module.get_opaque() Modified: pyplusplus_dev/unittests/data/call_policies_to_be_exported.cpp =================================================================== --- pyplusplus_dev/unittests/data/call_policies_to_be_exported.cpp 2006-11-13 19:00:19 UTC (rev 724) +++ pyplusplus_dev/unittests/data/call_policies_to_be_exported.cpp 2006-11-13 19:23:28 UTC (rev 725) @@ -1,5 +1,4 @@ -// 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) - +// 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) Modified: pyplusplus_dev/unittests/data/call_policies_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/call_policies_to_be_exported.hpp 2006-11-13 19:00:19 UTC (rev 724) +++ pyplusplus_dev/unittests/data/call_policies_to_be_exported.hpp 2006-11-13 19:23:28 UTC (rev 725) @@ -61,6 +61,20 @@ } +namespace fundamental_ptr{ + +inline float* get_fundamental_ptr_value(){ + static float x = 0.5; + return &x; } +inline float* get_fundamental_ptr_value_null(){ + return (float*)(0); +} + + +} + +} + #endif//__call_policies_to_be_exported_hpp__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |