Lines Matching full:table
46 HashTableInternals<> Table; in TEST() local
47 EXPECT_EQ(0u, Table.size()); in TEST()
48 EXPECT_GT(Table.capacity(), 0u); in TEST()
51 Table.set_as(3u, 7, Traits); in TEST()
52 EXPECT_EQ(1u, Table.size()); in TEST()
53 ASSERT_NE(Table.end(), Table.find_as(3u, Traits)); in TEST()
54 EXPECT_EQ(7u, Table.get(3u, Traits)); in TEST()
58 HashTableInternals<> Table; in TEST() local
59 EXPECT_EQ(0u, Table.size()); in TEST()
60 EXPECT_GT(Table.capacity(), 0u); in TEST()
62 // We use knowledge of the hash table's implementation details to make sure in TEST()
64 // hash table's capacity. in TEST()
65 uint32_t N1 = Table.capacity() + 1; in TEST()
69 Table.set_as(N1, 7, Traits); in TEST()
70 Table.set_as(N2, 12, Traits); in TEST()
71 EXPECT_EQ(2u, Table.size()); in TEST()
72 ASSERT_NE(Table.end(), Table.find_as(N1, Traits)); in TEST()
73 ASSERT_NE(Table.end(), Table.find_as(N2, Traits)); in TEST()
75 EXPECT_EQ(7u, Table.get(N1, Traits)); in TEST()
76 EXPECT_EQ(12u, Table.get(N2, Traits)); in TEST()
80 HashTableInternals<> Table; in TEST() local
81 EXPECT_EQ(0u, Table.size()); in TEST()
82 EXPECT_GT(Table.capacity(), 0u); in TEST()
85 Table.set_as(1u, 2, Traits); in TEST()
86 Table.set_as(3u, 4, Traits); in TEST()
87 EXPECT_EQ(2u, Table.size()); in TEST()
88 ASSERT_NE(Table.end(), Table.find_as(1u, Traits)); in TEST()
89 ASSERT_NE(Table.end(), Table.find_as(3u, Traits)); in TEST()
91 EXPECT_EQ(2u, Table.get(1u, Traits)); in TEST()
92 EXPECT_EQ(4u, Table.get(3u, Traits)); in TEST()
96 HashTableInternals<> Table; in TEST() local
97 EXPECT_EQ(0u, Table.size()); in TEST()
98 EXPECT_GT(Table.capacity(), 0u); in TEST()
103 uint32_t N1 = Table.capacity() + 1; in TEST()
108 Table.set_as(N1, 7, Traits); in TEST()
109 Table.set_as(N2, 11, Traits); in TEST()
110 Table.set_as(N3, 13, Traits); in TEST()
111 EXPECT_EQ(3u, Table.size()); in TEST()
112 ASSERT_NE(Table.end(), Table.find_as(N1, Traits)); in TEST()
113 ASSERT_NE(Table.end(), Table.find_as(N2, Traits)); in TEST()
114 ASSERT_NE(Table.end(), Table.find_as(N3, Traits)); in TEST()
116 EXPECT_EQ(7u, Table.get(N1, Traits)); in TEST()
117 EXPECT_EQ(11u, Table.get(N2, Traits)); in TEST()
118 EXPECT_EQ(13u, Table.get(N3, Traits)); in TEST()
124 // capacity is larger, and all the original items are still in the table. in TEST()
126 HashTableInternals<> Table; in TEST() local
128 uint32_t OldCapacity = Table.capacity(); in TEST()
130 Table.set_as(OldCapacity + I * 2 + 1, I * 2 + 3, Traits); in TEST()
132 EXPECT_EQ(OldCapacity, Table.size()); in TEST()
133 EXPECT_GT(Table.capacity(), OldCapacity); in TEST()
135 ASSERT_NE(Table.end(), Table.find_as(OldCapacity + I * 2 + 1, Traits)); in TEST()
136 EXPECT_EQ(I * 2 + 3, Table.get(OldCapacity + I * 2 + 1, Traits)); in TEST()
141 HashTableInternals<> Table; in TEST() local
143 uint32_t Cap = Table.capacity(); in TEST()
145 Table.set_as(Cap + I * 2 + 1, I * 2 + 3, Traits); in TEST()
148 std::vector<uint8_t> Buffer(Table.calculateSerializedLength()); in TEST()
151 EXPECT_THAT_ERROR(Table.commit(Writer), Succeeded()); in TEST()
161 EXPECT_EQ(Table.size(), Table2.size()); in TEST()
162 EXPECT_EQ(Table.capacity(), Table2.capacity()); in TEST()
163 EXPECT_EQ(Table.Buckets, Table2.Buckets); in TEST()
164 EXPECT_EQ(Table.Present, Table2.Present); in TEST()
165 EXPECT_EQ(Table.Deleted, Table2.Deleted); in TEST()
175 // To verify the hash table actually works, we want to verify that insertion in TEST()
242 HashTableInternals<FooBar> Table; in TEST() local
244 uint32_t Cap = Table.capacity(); in TEST()
249 Table.set_as(utostr(I), F, Traits); in TEST()
252 std::vector<uint8_t> Buffer(Table.calculateSerializedLength()); in TEST()
255 EXPECT_THAT_ERROR(Table.commit(Writer), Succeeded()); in TEST()
265 EXPECT_EQ(Table.size(), Table2.size()); in TEST()
266 EXPECT_EQ(Table.capacity(), Table2.capacity()); in TEST()
267 EXPECT_EQ(Table.Buckets, Table2.Buckets); in TEST()
268 EXPECT_EQ(Table.Present, Table2.Present); in TEST()
269 EXPECT_EQ(Table.Deleted, Table2.Deleted); in TEST()