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

Function testPreferenceReload

tests/amp_applet_test.cpp:104–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void testPreferenceReload()
105{
106 resetSettings();
107
108 {
109 AmpApplet applet;
110 auto* button = tempButton(applet);
111 report("preference button exists", button != nullptr);
112 if (!button) return;
113 button->click();
114 }
115
116 auto& settings = AppSettings::instance();
117 settings.reset();
118 settings.load();
119
120 AmpApplet restored;
121 auto* button = tempButton(restored);
122 report("reloaded button exists", button != nullptr);
123 if (!button) return;
124
125 report("reloaded placeholder uses Fahrenheit",
126 button->text() == QStringLiteral("\u2014 F"),
127 button->text());
128
129 restored.setTemp(0.0f);
130 report("reloaded value displays Fahrenheit",
131 button->text() == QStringLiteral("32.0 F"),
132 button->text());
133}
134
135} // namespace
136

Callers 1

mainFunction · 0.85

Calls 7

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

Tested by

no test coverage detected