MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_ref_qualified

Function test_ref_qualified

tests/test_methods_and_attributes.py:661–669  ·  view source on GitHub ↗

Tests that explicit lvalue ref-qualified methods can be called just like their non ref-qualified counterparts.

()

Source from the content-addressed store, hash-verified

659
660
661def test_ref_qualified():
662 """Tests that explicit lvalue ref-qualified methods can be called just like their
663 non ref-qualified counterparts."""
664
665 r = m.RefQualified()
666 assert r.value == 0
667 r.refQualified(17)
668 assert r.value == 17
669 assert r.constRefQualified(23) == 40
670
671
672def test_overload_ordering():

Callers

nothing calls this directly

Calls 2

refQualifiedMethod · 0.95
constRefQualifiedMethod · 0.95

Tested by

no test coverage detected