aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-13 15:04:03 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:12:53 -0300
commit3b747443bde5752277aa9791adbfc1d32868689b (patch)
tree46331deab4d066a8588504a0a4c9867a74615200 /tests/samplebinding
parent78e3c256ff6a154ce8068b3dd7bc551394d73422 (diff)
Used c++ pointer during the c++ class attribute get function.
Now all function get for class attribute return the internal memory of the c++ attribute. Reviewer: Hugo Parente <hugo.lima@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/class_fields_test.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/samplebinding/class_fields_test.py b/tests/samplebinding/class_fields_test.py
index f0791e1d2..c01a6bf07 100644
--- a/tests/samplebinding/class_fields_test.py
+++ b/tests/samplebinding/class_fields_test.py
@@ -64,7 +64,14 @@ class TestAccessingCppFields(unittest.TestCase):
new_value = Point(-10, 537)
d.valueTypeField = new_value
self.assertEqual(d.valueTypeField, new_value)
- self.assert_(not d.valueTypeField == old_value)
+
+ #object modify
+ d.valueTypeField.setX(10)
+ d.valueTypeField.setY(20)
+ self.assertEqual(d.valueTypeField.x(), 10)
+ self.assertEqual(d.valueTypeField.y(), 20)
+
+
# attribution with invalid type
self.assertRaises(TypeError, lambda : setattr(d, 'valueTypeField', 123))