]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2831] added a test (compile time in fact) for def of INITIAL_SIZE.
authorJINMEI Tatuya <jinmei@isc.org>
Sat, 13 Apr 2013 06:50:19 +0000 (23:50 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Sat, 13 Apr 2013 06:50:19 +0000 (23:50 -0700)
src/lib/util/tests/memory_segment_mapped_unittest.cc

index 1d3375b2400137402edd3c3fbc984e4f22918f19..1d9979de9eeacfaa0193c42b549745d3367ef218 100644 (file)
@@ -97,6 +97,13 @@ protected:
     scoped_ptr<MemorySegmentMapped> segment_;
 };
 
+TEST(MemorySegmentMappedConstantTest, staticVariables) {
+    // Attempt to take address of MemorySegmentMapped::INITIAL_SIZE.
+    // It helps in case we accidentally remove the definition from the main
+    // code.
+    EXPECT_EQ(DEFAULT_INITIAL_SIZE, *(&MemorySegmentMapped::INITIAL_SIZE));
+}
+
 TEST_F(MemorySegmentMappedTest, createAndModify) {
     // We are going to do the same set of basic tests twice; one after creating
     // the mapped file, the other by re-opening the existing file in the