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

Function TEST_SUBMODULE

tests/test_class_sh_trampoline_basic.cpp:48–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46using namespace pybind11_tests::class_sh_trampoline_basic;
47
48TEST_SUBMODULE(class_sh_trampoline_basic, m) {
49 py::classh<Abase, AbaseAlias>(m, "Abase")
50 .def(py::init<int>(), py::arg("val"))
51 .def("Get", &Abase::Get)
52 .def("Add", &Abase::Add, py::arg("other_val"));
53
54 m.def("AddInCppRawPtr", AddInCppRawPtr, py::arg("obj"), py::arg("other_val"));
55 m.def("AddInCppSharedPtr", AddInCppSharedPtr, py::arg("obj"), py::arg("other_val"));
56 m.def("AddInCppUniquePtr", AddInCppUniquePtr, py::arg("obj"), py::arg("other_val"));
57}

Callers

nothing calls this directly

Calls 1

argClass · 0.50

Tested by

no test coverage detected