Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
sds-keyval
Commits
8fd63a8d
Commit
8fd63a8d
authored
Aug 12, 2019
by
Matthieu Dorier
Browse files
corrected bug in sdskv-multi-test
parent
4f2f2902
Changes
1
Show whitespace changes
Inline
Side-by-side
test/sdskv-multi-test.cc
View file @
8fd63a8d
...
...
@@ -121,8 +121,8 @@ int main(int argc, char *argv[])
for
(
unsigned
i
=
0
;
i
<
num_keys
;
i
++
)
{
keys_ptr
[
i
]
=
(
const
void
*
)
keys
[
i
].
data
();
vals_ptr
[
i
]
=
(
const
void
*
)
vals
[
i
].
data
();
keys_size
[
i
]
=
keys
[
i
].
size
()
+
1
;
// +1 because of the null character
vals_size
[
i
]
=
vals
[
i
].
size
()
+
1
;
keys_size
[
i
]
=
keys
[
i
].
size
()
;
vals_size
[
i
]
=
vals
[
i
].
size
();
}
/* **** issue a put_multi ***** */
...
...
@@ -194,8 +194,11 @@ int main(int argc, char *argv[])
/* check the keys we received against reference */
for
(
unsigned
i
=
0
;
i
<
num_keys
;
i
++
)
{
std
::
string
vstring
(
read_values
[
i
].
data
());
vstring
.
resize
(
rval_len
[
i
]);
auto
&
k
=
keys
[
i
];
std
::
cout
<<
"Got "
<<
k
<<
" ===> "
<<
vstring
<<
"
\t
"
<<
"expected: "
<<
reference
[
k
]
<<
std
::
endl
;
std
::
cout
<<
"Got "
<<
k
<<
" ===> "
<<
vstring
<<
"
\t
(size = "
<<
vstring
.
size
()
<<
") expected: "
<<
reference
[
k
]
<<
" (size = "
<<
reference
[
k
].
size
()
<<
")"
<<
std
::
endl
;
if
(
vstring
!=
reference
[
k
])
{
fprintf
(
stderr
,
"Error: sdskv_get_multi() returned a value different from the reference
\n
"
);
sdskv_shutdown_service
(
kvcl
,
svr_addr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment