| 30 | using namespace oid::host; |
| 31 | |
| 32 | TEST(SettingsSaver, NoSaveWhenUnchanged) { |
| 33 | int saves = 0; |
| 34 | AppSettings s; |
| 35 | SettingsSaver saver{s, [&saves](const AppSettings&) { ++saves; }, 0.75}; |
| 36 | saver.update(s, 0.0); |
| 37 | saver.update(s, 100.0); |
| 38 | EXPECT_EQ(saves, 0); |
| 39 | } |
| 40 | |
| 41 | TEST(SettingsSaver, ChangeSavesOnlyAfterDebounce) { |
| 42 | int saves = 0; |