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

Function TEST_SUBMODULE

tests/test_union.cpp:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "pybind11_tests.h"
11
12TEST_SUBMODULE(union_, m) {
13 union TestUnion {
14 int value_int;
15 unsigned value_uint;
16 };
17
18 py::class_<TestUnion>(m, "TestUnion")
19 .def(py::init<>())
20 .def_readonly("as_int", &TestUnion::value_int)
21 .def_readwrite("as_uint", &TestUnion::value_uint);
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected