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

Function testSingleSensorToggle

tests/amp_applet_test.cpp:58–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void testSingleSensorToggle()
59{
60 resetSettings();
61
62 AmpApplet applet;
63 auto* button = tempButton(applet);
64 report("single sensor button exists", button != nullptr);
65 if (!button) return;
66
67 applet.setTemp(34.7f);
68 report("single sensor displays Celsius",
69 button->text() == QStringLiteral("34.7 C"),
70 button->text());
71
72 button->click();
73 report("single sensor toggles to Fahrenheit",
74 button->text() == QStringLiteral("94.5 F"),
75 button->text());
76
77 button->click();
78 report("single sensor toggles back to Celsius",
79 button->text() == QStringLiteral("34.7 C"),
80 button->text());
81}
82
83void testDualSensorToggle()
84{

Callers 1

mainFunction · 0.85

Calls 5

resetSettingsFunction · 0.85
tempButtonFunction · 0.85
setTempMethod · 0.80
reportFunction · 0.70
textMethod · 0.45

Tested by

no test coverage detected