Skip to content

Commit

Permalink
ci: reference dump() method for the settings storage
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Feb 11, 2022
1 parent c37bbb4 commit 456d1cc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions code/test/unit/src/settings/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <algorithm>
#include <numeric>

#include <cstdio>

namespace settings {
namespace embedis {

Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit 456d1cc

Please sign in to comment.