[pypy-commit] pypy reflex-support: reftester test
wlav
noreply at buildbot.pypy.org
Sat Mar 23 01:49:15 CET 2013
Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r62677:3d5c68f6a4d4
Date: 2013-03-22 17:46 -0700
http://bitbucket.org/pypy/pypy/changeset/3d5c68f6a4d4/
Log: reftester test
diff --git a/pypy/module/cppyy/test/advancedcpp.xml b/pypy/module/cppyy/test/advancedcpp.xml
--- a/pypy/module/cppyy/test/advancedcpp.xml
+++ b/pypy/module/cppyy/test/advancedcpp.xml
@@ -33,6 +33,9 @@
<class name="some_class_with_data" />
<class name="some_class_with_data::some_data" />
+ <class name="ref_tester" />
+ <class name="std::vector<ref_tester>" />
+
<class name="pointer_pass" />
<class pattern="multi*" />
diff --git a/pypy/module/cppyy/test/test_advancedcpp.py b/pypy/module/cppyy/test/test_advancedcpp.py
--- a/pypy/module/cppyy/test/test_advancedcpp.py
+++ b/pypy/module/cppyy/test/test_advancedcpp.py
@@ -579,3 +579,18 @@
assert type(f('c')) == type('c')
assert f(3.) == 3.
assert type(f(4.)) == type(4.)
+
+ def test18_assign_to_return_byref( self ):
+ """Test assignment to an instance returned by reference"""
+
+ from cppyy import gbl
+
+ a = gbl.std.vector(gbl.ref_tester)()
+ a.push_back(gbl.ref_tester(42))
+
+ assert len(a) == 1
+ assert a[0].m_i == 42
+
+ # a[0] = gbl.ref_tester(33)
+ # assert len(a) == 1
+ # assert a[0].m_i == 33
More information about the pypy-commit
mailing list