diff --git a/tests/test_class_sh_shared_ptr_copy_move.cpp b/tests/test_class_sh_shared_ptr_copy_move.cpp index a0b9fde5b..ded0a40d7 100644 --- a/tests/test_class_sh_shared_ptr_copy_move.cpp +++ b/tests/test_class_sh_shared_ptr_copy_move.cpp @@ -13,11 +13,11 @@ const std::string fooNames[] = {"ShPtr_", "SmHld_"}; template struct Foo { - std::string mtxt; - Foo(const std::string &mtxt_) : mtxt(mtxt_) {} + std::string hisotry; + Foo(const std::string &hisotry_) : hisotry(hisotry_) {} Foo(const Foo &other) = delete; Foo(Foo &&other) = delete; - std::string get_text() const { return "Foo" + fooNames[SerNo] + mtxt; } + std::string get_history() const { return "Foo" + fooNames[SerNo] + hisotry; } }; using FooShPtr = Foo<0>; @@ -36,9 +36,9 @@ TEST_SUBMODULE(class_sh_shared_ptr_copy_move, m) { namespace py = pybind11; py::class_>(m, "FooShPtr") - .def("get_text", &FooShPtr::get_text); + .def("get_history", &FooShPtr::get_history); py::classh(m, "FooSmHld") - .def("get_text", &FooSmHld::get_text); + .def("get_history", &FooSmHld::get_history); m.def("test_ShPtr_copy", []() { auto o = std::make_shared("copy"); diff --git a/tests/test_class_sh_shared_ptr_copy_move.py b/tests/test_class_sh_shared_ptr_copy_move.py index 9f3813434..81c5b9601 100644 --- a/tests/test_class_sh_shared_ptr_copy_move.py +++ b/tests/test_class_sh_shared_ptr_copy_move.py @@ -4,20 +4,20 @@ from pybind11_tests import class_sh_shared_ptr_copy_move as m def test_shptr_copy(): - txt = m.test_ShPtr_copy()[0].get_text() + txt = m.test_ShPtr_copy()[0].get_history() assert txt == "FooShPtr_copy" def test_smhld_copy(): - txt = m.test_SmHld_copy()[0].get_text() + txt = m.test_SmHld_copy()[0].get_history() assert txt == "FooSmHld_copy" def test_shptr_move(): - txt = m.test_ShPtr_move()[0].get_text() + txt = m.test_ShPtr_move()[0].get_history() assert txt == "FooShPtr_move" def test_smhld_move(): - txt = m.test_SmHld_move()[0].get_text() + txt = m.test_SmHld_move()[0].get_history() assert txt == "FooSmHld_move"