Commit Graph

8 Commits

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve
95e9053f7f Boilerplate changes: Skip all test_class_sh_* if PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT is not defined. 2024-07-19 09:54:40 -07:00
Ralf W. Grosse-Kunstleve
0b7a628a04 Check for Python instance is uninitialized/disowned in type_caster_base.h. CRUDE intermediate state, needs refactoring.
All 4 remaining BAKEIN_BREAK removed from test_class_sh_basic.py. With that both test_class_sh_basic.cpp and test_class_sh_basic.py are identical to the smart_holder branch.

All unit tests pass ASAN and MSAN testing with the Google-internal toolchain.
2024-07-05 00:28:43 -07:00
Ralf W. Grosse-Kunstleve
ebbe066841 Implement operator std::unique_ptr<type, deleter>(). Resolves all but 1 block of 4 BAKEIN_BREAK in test_class_sh_basic.py 2024-07-04 11:26:43 -07:00
Ralf W. Grosse-Kunstleve
224e9343d2 Implement operator std::shared_ptr<type> &(), remove 2 BAKEIN_BREAK: pass_shmp, pass_shcp 2024-07-03 13:51:50 -07:00
Ralf W. Grosse-Kunstleve
5957133b6e Add smart_holder_from_unique_ptr() specialization for std::unique_ptr<T const, D>
Enables removing:
4 BAKEIN_BREAK in test_class_sh_basic.cpp
2 BAKEIN_BREAK in test_class_sh_basic.py
2024-07-03 07:38:18 -07:00
Ralf W. Grosse-Kunstleve
7a6d30ca58 Fix rtrn_shmp, rtrn_shmp by transferring smart_holder_from_shared_ptr() functionality from smart_holder branch. 2024-07-02 18:25:01 -07:00
Ralf W. Grosse-Kunstleve
12b01305de Add no-op pybind11/smart_holder.h, 21 BAKEIN_BREAK in test_class_sh_basic.cpp, 26 BAKEIN_BREAK in test_class_sh_basic.py
```
========================================================= short test summary info ==========================================================
SKIPPED [1] test_class_sh_basic.py:59: got empty parameter set ('pass_f', 'rtrn_f', 'expected'), function test_load_with_rtrn_f at /usr/local/google/home/rwgk/forked/pybind11/tests/test_class_sh_basic.py:58
SKIPPED [1] test_class_sh_basic.py:70: got empty parameter set ('pass_f', 'rtrn_f', 'regex_expected'), function test_deleter_roundtrip at /usr/local/google/home/rwgk/forked/pybind11/tests/test_class_sh_basic.py:69
SKIPPED [1] test_class_sh_basic.py:99: got empty parameter set ('pass_f', 'rtrn_f', 'expected'), function test_pass_unique_ptr_disowns at /usr/local/google/home/rwgk/forked/pybind11/tests/test_class_sh_basic.py:98
SKIPPED [1] test_class_sh_basic.py:120: got empty parameter set ('pass_f', 'rtrn_f'), function test_cannot_disown_use_count_ne_1 at /usr/local/google/home/rwgk/forked/pybind11/tests/test_class_sh_basic.py:119
SKIPPED [1] test_class_sh_basic.py:145: BAKEIN_BREAK: AttributeError unique_ptr_roundtrip
SKIPPED [1] test_class_sh_basic.py:157: unconditional skip
SKIPPED [1] test_class_sh_basic.py:169: got empty parameter set ('pass_f', 'rtrn_f', 'moved_out', 'moved_in'), function test_unique_ptr_consumer_roundtrip at /usr/local/google/home/rwgk/forked/pybind11/tests/test_class_sh_basic.py:168
SKIPPED [1] test_class_sh_basic.py:210: BAKEIN_BREAK: AttributeError args_unique_ptr
====================================================== 17 passed, 8 skipped in 0.04s =======================================================```
2024-07-02 14:43:23 -07:00
Ralf W. Grosse-Kunstleve
b6171bc7ad Bring in tests/test_class_sh_basic.cpp,py from smart_holder branch as-is (does not build). 2024-07-02 13:40:16 -07:00