From: JINMEI Tatuya Date: Sat, 13 Apr 2013 06:50:19 +0000 (-0700) Subject: [2831] added a test (compile time in fact) for def of INITIAL_SIZE. X-Git-Tag: bind10-1.2.0beta1-release~457^2~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2fcb467b96cb4229e35330a9ca72db8065953bb;p=thirdparty%2Fkea.git [2831] added a test (compile time in fact) for def of INITIAL_SIZE. --- diff --git a/src/lib/util/tests/memory_segment_mapped_unittest.cc b/src/lib/util/tests/memory_segment_mapped_unittest.cc index 1d3375b240..1d9979de9e 100644 --- a/src/lib/util/tests/memory_segment_mapped_unittest.cc +++ b/src/lib/util/tests/memory_segment_mapped_unittest.cc @@ -97,6 +97,13 @@ protected: scoped_ptr 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