summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/tests/messagerenderer_unittest.cc
diff options
context:
space:
mode:
authorJINMEI Tatuya <jinmei@isc.org>2012-02-24 08:16:56 +0100
committerJINMEI Tatuya <jinmei@isc.org>2012-02-24 08:16:56 +0100
commit89f1ae8c2f2bb8829ae249414e9d8464b74b54be (patch)
treede638071fe1cca6c076703eced99c72511ad5c3c /src/lib/dns/tests/messagerenderer_unittest.cc
parent[1697] added AbstractMessageRenderer::setBuffer method (diff)
downloadkea-89f1ae8c2f2bb8829ae249414e9d8464b74b54be.tar.xz
kea-89f1ae8c2f2bb8829ae249414e9d8464b74b54be.zip
[1697] made sure the used buffer is intact on reset.
Diffstat (limited to 'src/lib/dns/tests/messagerenderer_unittest.cc')
-rw-r--r--src/lib/dns/tests/messagerenderer_unittest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/dns/tests/messagerenderer_unittest.cc b/src/lib/dns/tests/messagerenderer_unittest.cc
index 9cd14cd45c..ff2297a34b 100644
--- a/src/lib/dns/tests/messagerenderer_unittest.cc
+++ b/src/lib/dns/tests/messagerenderer_unittest.cc
@@ -184,8 +184,9 @@ TEST_F(MessageRendererTest, setBuffer) {
EXPECT_EQ(4096, renderer.getLengthLimit());
// Reset the buffer to the default again. Other internal states and
- // resources should be cleared.
+ // resources should be cleared. The used buffer should be intact.
renderer.setBuffer(NULL);
+ EXPECT_EQ(sizeof(uint32_t), new_buffer.getLength());
EXPECT_EQ(0, renderer.getLength());
EXPECT_EQ(512, renderer.getLengthLimit());
}