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
eb9306a8
Commit
eb9306a8
authored
Aug 09, 2019
by
Matthieu Dorier
Browse files
added test for DB.erase
parent
6ff35da8
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/sdskv-cxx-test.cc
View file @
eb9306a8
...
...
@@ -134,6 +134,15 @@ static int put_get_erase_test(sdskv::database& DB, uint32_t num_keys) {
DB
.
erase
(
keys
[
i
]);
}
/* try getting a random key that should have been deleted */
try
{
std
::
vector
<
char
>
v
(
max_value_size
);
DB
.
get
(
keys
[
num_keys
/
2
],
v
);
throw
std
::
runtime_error
(
"DB.get() succeeded when it shouldn't have"
);
}
catch
(
sdskv
::
exception
&
ex
)
{
std
::
cout
<<
"Correctly thronw exception: "
<<
ex
.
what
()
<<
std
::
endl
;
}
return
0
;
}
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