| 56 | } |
| 57 | |
| 58 | void 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 | |
| 83 | void testDualSensorToggle() |
| 84 | { |
no test coverage detected