MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / testSamplerStatusIdempotent

Function testSamplerStatusIdempotent

tests/transmit_model_apd_test.cpp:132–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void testSamplerStatusIdempotent()
133{
134 TransmitModel tx;
135
136 tx.applyApdSamplerStatus(kvs({
137 {"tx_ant", "ANT1"},
138 {"selected_sampler", "RX_A"},
139 {"valid_samplers", "RX_A,XVTA"},
140 }));
141
142 QSignalSpy spy(&tx, &TransmitModel::apdSamplerChanged);
143 // Re-apply identical status — must not re-emit.
144 tx.applyApdSamplerStatus(kvs({
145 {"tx_ant", "ANT1"},
146 {"selected_sampler", "RX_A"},
147 {"valid_samplers", "RX_A,XVTA"},
148 }));
149 report("identical sampler status is idempotent", spy.count() == 0);
150}
151
152void testResetStateClearsSamplers()
153{

Callers 1

mainFunction · 0.85

Calls 4

kvsFunction · 0.85
applyApdSamplerStatusMethod · 0.80
countMethod · 0.80
reportFunction · 0.70

Tested by

no test coverage detected