This website works better with JavaScript.
Home
Explore
Help
Sign In
mh
/
espurna-mirror
mirror of
https://github.com/xoseperez/espurna
Watch
1
Star
0
Fork
1
Code
Releases
72
Activity
Browse Source
ci: reference dump() method for the settings storage
pull/2508/head
Maxim Prokhorov
2 years ago
parent
c37bbb42a6
commit
456d1cc586
1 changed files
with
19 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+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
<algorithm>
#
include
<numeric>
#
include
<numeric>
#
include
<cstdio>
namespace
settings
{
namespace
settings
{
namespace
embedis
{
namespace
embedis
{
@ -60,6 +62,23 @@ struct StorageHandler {
blob
.
fill
(
0xff
)
;
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
;
array_type
blob
;
kvs_type
kvs
;
kvs_type
kvs
;
}
;
}
;
Write
Preview
Loading…
Cancel
Save