[pygccxml-commit] SF.net SVN: pygccxml: [954] pyplusplus_dev/unittests
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2007-03-08 07:33:42
|
Revision: 954
http://svn.sourceforge.net/pygccxml/?rev=954&view=rev
Author: roman_yakovenko
Date: 2007-03-07 23:33:42 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
adding new use-case to the test
Modified Paths:
--------------
pyplusplus_dev/unittests/custom_string_tester.py
pyplusplus_dev/unittests/data/custom_string_to_be_exported.hpp
Modified: pyplusplus_dev/unittests/custom_string_tester.py
===================================================================
--- pyplusplus_dev/unittests/custom_string_tester.py 2007-03-07 19:39:04 UTC (rev 953)
+++ pyplusplus_dev/unittests/custom_string_tester.py 2007-03-08 07:33:42 UTC (rev 954)
@@ -68,6 +68,7 @@
mb.constructors().allow_implicit_conversion = False
mb.variable( 'm_name' ).use_make_functions = True
mb.variable( 'm_123' ).use_make_functions = True
+ mb.class_( 'name_t' ).add_properties();
def run_tests( self, module):
self.failUnless( "1" == module.utf16_to_string( "1" ) )
@@ -77,6 +78,9 @@
self.failUnless( '456' == module.utf16_to_string( n.m_name ) )
self.failUnless( '123' == module.utf16_to_string( n.m_123 ) )
+ n.name = '11'
+ self.failUnless( '11' == module.utf16_to_string( n.m_name ) )
+
def create_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite(tester_t))
Modified: pyplusplus_dev/unittests/data/custom_string_to_be_exported.hpp
===================================================================
--- pyplusplus_dev/unittests/data/custom_string_to_be_exported.hpp 2007-03-07 19:39:04 UTC (rev 953)
+++ pyplusplus_dev/unittests/data/custom_string_to_be_exported.hpp 2007-03-08 07:33:42 UTC (rev 954)
@@ -23,6 +23,7 @@
utf16_t& operator=( const utf16_t& other ){
m_value_a = other.m_value_a;
m_value_w = other.m_value_w;
+ return *this;
}
std::string const& value_a() const { return m_value_a; }
@@ -36,6 +37,9 @@
struct name_t{
name_t() : m_123( "123" ){}
+ const utf16_t& get_name() const { return m_name; }
+ void set_name(const utf16_t& n) { m_name = n; }
+
utf16_t m_name;
const utf16_t m_123;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|