From: JINMEI Tatuya Date: Mon, 27 Aug 2012 22:28:41 +0000 (-0700) Subject: [2107] updated doc for MemorySegmentTest, with correction and clarification. X-Git-Tag: trac2351_base~109^2~1^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e463e914a5442a5ab72c1a7aed0d8eb103a7dda;p=thirdparty%2Fkea.git [2107] updated doc for MemorySegmentTest, with correction and clarification. --- diff --git a/src/lib/datasrc/memory/tests/memory_segment_test.h b/src/lib/datasrc/memory/tests/memory_segment_test.h index 78f4182ceb..3195a9b1b8 100644 --- a/src/lib/datasrc/memory/tests/memory_segment_test.h +++ b/src/lib/datasrc/memory/tests/memory_segment_test.h @@ -27,8 +27,12 @@ namespace test { // A special memory segment that can be used for tests. It normally behaves // like a "local" memory segment. If "throw count" is set to non 0 via -// setThrowCount(), it continues the normal behavior up to the specified -// number of calls to allocate(), and throws an exception at the next call. +// setThrowCount(), it continues the normal behavior until the specified +// number of calls to allocate(), exclusive, and throws an exception at the +// next call. For example, if count is set to 3, the next two calls to +// allocate() will succeed, and the 3rd call will fail with an exception. +// This segment object can be used after the exception is thrown, and the +// count is internally reset to 0. class MemorySegmentTest : public isc::util::MemorySegmentLocal { public: MemorySegmentTest() : throw_count_(0) {}