Index: test/cctest/test-list.cc |
diff --git a/test/cctest/test-list.cc b/test/cctest/test-list.cc |
index 7520b05fcb59d5ebcb5d2c4b12fa3f7c0eed811c..4c78f02cee1e0bae1bbcb03b9986e461b6a6354c 100644 |
--- a/test/cctest/test-list.cc |
+++ b/test/cctest/test-list.cc |
@@ -130,6 +130,18 @@ TEST(RemoveLast) { |
} |
+TEST(Allocate) { |
+ List<int> list(4); |
+ list.Add(1); |
+ CHECK_EQ(1, list.length()); |
+ list.Allocate(100); |
+ CHECK_EQ(100, list.length()); |
+ CHECK_LE(100, list.capacity()); |
+ list[99] = 123; |
+ CHECK_EQ(123, list[99]); |
+} |
+ |
+ |
TEST(Clear) { |
List<int> list(4); |
CHECK_EQ(0, list.length()); |