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

Function get_sample_vectors

tests/test_with_catch/test_args_convert_vector.cpp:10–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace {
9template <typename Container>
10std::vector<Container> get_sample_vectors() {
11 std::vector<Container> result;
12 result.emplace_back();
13 for (const auto sz : {0, 4, 5, 6, 31, 32, 33, 63, 64, 65}) {
14 for (const bool b : {false, true}) {
15 result.emplace_back(static_cast<std::size_t>(sz), b);
16 }
17 }
18 return result;
19}
20
21void require_vector_matches_sample(const args_convert_vector &actual,
22 const std::vector<bool> &expected) {

Callers

nothing calls this directly

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected