Move tests from test_issues.cpp/py into appropriate files

This commit is contained in:
Dean Moldovan
2017-06-07 16:52:50 +02:00
parent 44e9a4e6cf
commit bdfb50f384
21 changed files with 510 additions and 632 deletions

View File

@@ -109,3 +109,13 @@ def test_private_op_new():
assert "the object is neither movable nor copyable" in str(excinfo.value)
assert m.private_op_new_reference().value == 1
def test_move_fallback():
"""#389: rvp::move should fall-through to copy on non-movable objects"""
from pybind11_tests import get_moveissue1, get_moveissue2
m2 = get_moveissue2(2)
assert m2.value == 2
m1 = get_moveissue1(1)
assert m1.value == 1