Commit dba0f070 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2209] Test ZoneTableSegmentLocal

And not ZoneTableSegmentTest like before. Testing a mock class (and not
testing the real class) makes no sense.
parent b77e7ed3
......@@ -30,6 +30,7 @@ ZoneTableSegmentLocal::ZoneTableSegmentLocal(const RRClass& rrclass) :
ZoneTableSegmentLocal::~ZoneTableSegmentLocal() {
ZoneTable::destroy(mem_sgmt_, header_.getTable());
assert(mem_sgmt_.allMemoryDeallocated());
}
// After more methods' definitions are added here, it would be a good
......
......@@ -12,7 +12,6 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include "zone_table_segment_test.h"
#include <datasrc/memory/zone_writer_local.h>
#include <datasrc/memory/zone_table_segment_local.h>
#include <util/memory_segment_local.h>
......@@ -32,23 +31,15 @@ namespace {
class ZoneTableSegmentTest : public ::testing::Test {
protected:
ZoneTableSegmentTest() :
ztable_segment_(new test::ZoneTableSegmentTest(RRClass::IN(),
mem_sgmt_))
ztable_segment_(ZoneTableSegment::create(isc::data::NullElement(),
RRClass::IN()))
{}
~ZoneTableSegmentTest() {
delete ztable_segment_;
}
void TearDown() {
ZoneTableSegment::destroy(ztable_segment_);
ztable_segment_ = NULL;
// Catch any future leaks here.
EXPECT_TRUE(mem_sgmt_.allMemoryDeallocated());
}
MemorySegmentLocal mem_sgmt_;
ZoneTableSegment* ztable_segment_;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment