Browse Source

ci: reference dump() method for the settings storage

pull/2508/head
Maxim Prokhorov 2 years ago
parent
commit
456d1cc586
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      code/test/unit/src/settings/settings.cpp

+ 19
- 0
code/test/unit/src/settings/settings.cpp View File

@ -13,6 +13,8 @@
#include <algorithm>
#include <numeric>
#include <cstdio>
namespace settings {
namespace embedis {
@ -60,6 +62,23 @@ struct StorageHandler {
blob.fill(0xff);
}
void dump() const {
size_t count { 0 };
char sep { ' ' };
for (const auto& c : blob) {
++count;
if (count == 8) {
sep = '\n';
}
::printf("%02X%c", c, sep);
if (count == 8) {
sep = ' ';
count = 0;
}
}
}
array_type blob;
kvs_type kvs;
};


Loading…
Cancel
Save