Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
c9f90e89
Commit
c9f90e89
authored
Jul 13, 2012
by
Mukund Sivaraman
Browse files
[2088] Deallocate all memory in TestBadDeallocate unit test
parent
59c5e16d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/util/tests/memory_segment_local_unittest.cc
View file @
c9f90e89
...
...
@@ -84,6 +84,12 @@ TEST(MemorySegmentLocal, TestBadDeallocate) {
// This should throw as the size passed to deallocate() is larger
// than what was allocated.
EXPECT_THROW
(
segment
->
deallocate
(
ptr
,
2048
),
isc
::
OutOfRange
);
// This should not throw
EXPECT_NO_THROW
(
segment
->
deallocate
(
ptr
,
1024
));
// Now, we have an deallocated everything:
EXPECT_TRUE
(
segment
->
allMemoryDeallocated
());
}
TEST
(
MemorySegmentLocal
,
TestNullDeallocate
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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