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

Function TEST

pj_app/tests/key_sequence_watcher_test.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28TEST(KeySequenceWatcher, FiresOnceOnFullSequenceAndNeverConsumes) {
29 int fired = 0;
30 KeySequenceWatcher w(unlockSteps(), [&] { ++fired; });
31 for (int key : activationKeys()) {
32 QKeyEvent e = makePress(key);
33 EXPECT_FALSE(w.eventFilter(nullptr, &e)); // returns false => not consumed
34 }
35 EXPECT_EQ(fired, 1);
36}
37
38TEST(KeySequenceWatcher, IgnoresAutoRepeat) {
39 int fired = 0;

Callers

nothing calls this directly

Calls 6

unlockStepsFunction · 0.85
activationKeysFunction · 0.85
makePressFunction · 0.85
eventFilterMethod · 0.45
sizeMethod · 0.45
setTimestampMethod · 0.45

Tested by

no test coverage detected