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

Function test_vector_bool

tests/test_stl_binders.py:129–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128
129def test_vector_bool():
130 import pybind11_cross_module_tests as cm
131
132 vv_c = cm.VectorBool()
133 for i in range(10):
134 vv_c.append(i % 2 == 0)
135 for i in range(10):
136 assert vv_c[i] == (i % 2 == 0)
137 assert str(vv_c) == "VectorBool[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]"
138
139
140def test_vector_custom():

Callers

nothing calls this directly

Calls 2

strClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected