MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / stepsFor

Function stepsFor

pj_app/tests/key_sequence_matcher_test.cpp:17–24  ·  view source on GitHub ↗

Per-position step values for an arbitrary key sequence. These tests exercise the generic engine, so the codes below are synthetic placeholders rather than any particular real sequence.

Source from the content-addressed store, hash-verified

15// the generic engine, so the codes below are synthetic placeholders rather than
16// any particular real sequence.
17std::vector<std::uint32_t> stepsFor(const std::vector<int>& keys) {
18 std::vector<std::uint32_t> steps;
19 steps.reserve(keys.size());
20 for (std::size_t i = 0; i < keys.size(); ++i) {
21 steps.push_back(stepHash(i, keys[i]));
22 }
23 return steps;
24}
25
26// Synthetic sequence; kSeq[0] == kSeq[1] so the restart-at-one case is covered.
27const std::vector<int> kSeq = {10, 10, 20, 30};

Callers 1

TESTFunction · 0.85

Calls 3

stepHashFunction · 0.85
reserveMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected