Parcourir la source

[2850] Test that the dynamic_cast passes every time

Mukund Sivaraman il y a 12 ans
Parent
commit
53a1410acc

+ 4 - 7
src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc

@@ -37,7 +37,10 @@ protected:
             ZoneTableSegment::create(RRClass::IN(), "mapped"))),
         config_params_(
             Element::fromJSON("{\"mapped-file\": \"" + mapped_file + "\"}"))
-    {}
+    {
+        // Verify that a ZoneTableSegmentMapped is created.
+        EXPECT_NE(static_cast<void*>(NULL), ztable_segment_);
+    }
 
     ~ZoneTableSegmentMappedTest() {
         boost::interprocess::file_mapping::remove(mapped_file.c_str());
@@ -52,12 +55,6 @@ protected:
     const ConstElementPtr config_params_;
 };
 
-
-TEST_F(ZoneTableSegmentMappedTest, create) {
-    // Verify that a mapped segment is created.
-    EXPECT_NE(static_cast<void*>(NULL), ztable_segment_);
-}
-
 TEST_F(ZoneTableSegmentMappedTest, getHeaderUninitialized) {
     // This should throw as we haven't called reset() yet.
     EXPECT_THROW(ztable_segment_->getHeader(), isc::Unexpected);