| 231 | |
| 232 | template <size_t N> |
| 233 | void CheckClear(bool expect_overflow) { |
| 234 | IntVectorType<N> ints = MakeVector<N>({5, 6, 7, 8, 9}); |
| 235 | ASSERT_EQ(ints.size(), 5); |
| 236 | size_t capacity = ints.capacity(); |
| 237 | |
| 238 | ints.clear(); |
| 239 | ASSERT_EQ(ints.size(), 0); |
| 240 | ASSERT_EQ(ints.capacity(), capacity); |
| 241 | ASSERT_EQ(UsesStaticStorage(ints), !expect_overflow); |
| 242 | } |
| 243 | |
| 244 | void TestClear() { |
| 245 | CheckClear<Traits::TestSizeFor(5)>(/*expect_overflow=*/Traits::CanOverflow()); |
nothing calls this directly
no test coverage detected