Lines Matching full:list
7 // notice, this list of conditions and the following disclaimer.
9 // copyright notice, this list of conditions and the following
54 // Check that we can add (a reference to) an element of the list
57 // Add elements to the list to grow it to its capacity.
58 List<int, ZeroingAllocationPolicy> list(4);
59 list.Add(1);
60 list.Add(2);
61 list.Add(3);
62 list.Add(4);
65 list.Add(list[0]);
66 CHECK_EQ(1, list[4]);
69 // Test that we can add all elements from a list to another list.
71 List<int, ZeroingAllocationPolicy> list(4);
72 list.Add(0);
73 list.Add(1);
74 list.Add(2);
76 CHECK_EQ(3, list.length());
78 CHECK_EQ(i, list[i]);
81 List<int, ZeroingAllocationPolicy> other_list(4);
83 // Add no elements to list since other_list is empty.
84 list.AddAll(other_list);
85 CHECK_EQ(3, list.length());
87 CHECK_EQ(i, list[i]);
95 // Copy the three elements from other_list to list.
96 list.AddAll(other_list);
97 CHECK_EQ(6, list.length());
99 CHECK_EQ(i % 3, list[i]);