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.
| 15 | // the generic engine, so the codes below are synthetic placeholders rather than |
| 16 | // any particular real sequence. |
| 17 | std::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. |
| 27 | const std::vector<int> kSeq = {10, 10, 20, 30}; |