mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 21:29:56 +00:00
Stash radio settings per app (#1151)
* add a little Stash utility. * add radio state RAII helper. * first part of radio_state changes * add radio_state_ to rest of apps * fix freq_step and format * fix unused ui_sigfrx: corrected sample rate, added back freq setting
This commit is contained in:
@@ -47,4 +47,16 @@ TEST_CASE("When flag not set, flags_enabled should be false.") {
|
||||
static_assert(flags_enabled(f, Flags::A) == false);
|
||||
}
|
||||
|
||||
TEST_SUITE_END();
|
||||
TEST_SUITE_END();
|
||||
|
||||
TEST_CASE("Stash should save and restore value.") {
|
||||
int val = 10;
|
||||
|
||||
{
|
||||
Stash s{val};
|
||||
val = 20;
|
||||
CHECK_EQ(val, 20);
|
||||
}
|
||||
|
||||
CHECK_EQ(val, 10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user