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

Function TEST

pj_app/tests/key_sequence_matcher_test.cpp:29–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27const std::vector<int> kSeq = {10, 10, 20, 30};
28
29TEST(KeySequenceMatcher, FiresOnlyOnFullSequence) {
30 KeySequenceMatcher m(stepsFor(kSeq));
31 for (std::size_t i = 0; i + 1 < kSeq.size(); ++i) {
32 EXPECT_FALSE(m.feed(kSeq[i])) << "fired early at index " << i;
33 }
34 EXPECT_TRUE(m.feed(kSeq.back()));
35}
36
37TEST(KeySequenceMatcher, WrongKeyResetsProgress) {
38 KeySequenceMatcher m(stepsFor(kSeq));

Callers

nothing calls this directly

Calls 4

stepsForFunction · 0.85
feedMethod · 0.80
progressMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected