ZoneTableSegmentLocal::reset(MemorySegmentOpenMode,
isc::data::ConstElementPtr)
{
- // This method doesn't do anything in this implementation.
+ isc_throw(isc::NotImplemented,
+ "ZoneTableSegmentLocal::reset() is not implemented and "
+ "should not be used.");
}
// After more methods' definitions are added here, it would be a good
return (true);
}
- /// \brief This method currently doesn't do anything.
+ /// \brief This method is not implemented.
///
- /// \c mode and \c params args are currently ignored.
+ /// \throw isc::NotImplemented
virtual void reset(MemorySegmentOpenMode mode,
isc::data::ConstElementPtr params);
}
TEST_F(ZoneTableSegmentTest, reset) {
- // reset() currently doesn't do anything in a local segment. But
- // test the API.
- ztable_segment_->reset(ZoneTableSegment::CREATE,
- Element::fromJSON("{}"));
+ // reset() should throw that it's not implemented so that any
+ // accidental calls are found out.
+ EXPECT_THROW({
+ ztable_segment_->reset(ZoneTableSegment::CREATE,
+ Element::fromJSON("{}"));
+ }, isc::NotImplemented);
}
// Helper function to check const and non-const methods.