From: JINMEI Tatuya Date: Tue, 28 Aug 2012 21:34:20 +0000 (-0700) Subject: [2107] renamed exception-safety tests for ZoneDataTest with more comments. X-Git-Tag: trac2351_base~109^2~1^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44f92aeb7817fec9534698ac659d898d1a35acbb;p=thirdparty%2Fkea.git [2107] renamed exception-safety tests for ZoneDataTest with more comments. hopefully the new name better represents the intent. --- diff --git a/src/lib/datasrc/memory/tests/zone_data_unittest.cc b/src/lib/datasrc/memory/tests/zone_data_unittest.cc index c81801cf10..d361b346bc 100644 --- a/src/lib/datasrc/memory/tests/zone_data_unittest.cc +++ b/src/lib/datasrc/memory/tests/zone_data_unittest.cc @@ -150,10 +150,12 @@ TEST_F(ZoneDataTest, getOriginNode) { EXPECT_EQ(LabelSequence(zname_), zone_data_->getOriginNode()->getLabels()); } -TEST_F(ZoneDataTest, throwOnCreate) { +TEST_F(ZoneDataTest, exceptionSafetyOnCreate) { // Note: below, we use our knowledge of how memory allocation happens // within the NSEC3Data, the zone data and the underlying domain tree - // implementation. + // implementation. We'll emulate rare situations where allocate() fails + // with an exception, and confirm it doesn't cause any harsh disruption + // or leak. // Creating internal NSEC3 tree will succeed, but allocation of NSEC3Data // will fail due to bad_alloc. It shouldn't cause memory leak