Cover MemoryPoolAllocator::Capacity()

This commit is contained in:
miloyip 2015-04-14 09:49:55 +08:00
parent f51c0141c5
commit 5dde9ae45e

View File

@ -243,6 +243,10 @@ TEST(Document, UserBuffer) {
EXPECT_FALSE(doc.HasParseError()); EXPECT_FALSE(doc.HasParseError());
EXPECT_LE(valueAllocator.Size(), sizeof(valueBuffer)); EXPECT_LE(valueAllocator.Size(), sizeof(valueBuffer));
EXPECT_LE(parseAllocator.Size(), sizeof(parseBuffer)); EXPECT_LE(parseAllocator.Size(), sizeof(parseBuffer));
// Cover MemoryPool::Capacity()
EXPECT_LE(valueAllocator.Size(), valueAllocator.Capacity());
EXPECT_LE(parseAllocator.Size(), parseAllocator.Capacity());
} }
// Issue 226: Value of string type should not point to NULL // Issue 226: Value of string type should not point to NULL