]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2831] clarified the check after repeated shrinkToFit.
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 12 Apr 2013 23:52:33 +0000 (16:52 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 12 Apr 2013 23:52:33 +0000 (16:52 -0700)
src/lib/util/tests/memory_segment_mapped_unittest.cc

index e64aed669730843951af1a36c700d1921b1bbcaa..fcb55e700729378606ae64888dcad196c5ab9773 100644 (file)
@@ -439,8 +439,11 @@ TEST_F(MemorySegmentMappedTest, shrink) {
     const size_t shrinked_size = segment_->getSize();
     EXPECT_GT(DEFAULT_INITIAL_SIZE, shrinked_size);
 
-    // Another shrink shouldn't cause disruption, and the size shouldn't
-    // change.
+    // Another shrink shouldn't cause disruption.  We expect the size is
+    // the same so we confirm it.  The underlying library doesn't guarantee
+    // that, so we may have to change it to EXPECT_GE if the test fails
+    // on that (MemorySegmentMapped class doesn't rely on this expectation,
+    // so it's okay even if it does not always hold).
     segment_->shrinkToFit();
     EXPECT_EQ(shrinked_size, segment_->getSize());