| 409 | } |
| 410 | |
| 411 | void TestShrink() { |
| 412 | TVector<int> v; |
| 413 | v.resize(1000); |
| 414 | v.resize(10); |
| 415 | v.shrink_to_fit(); |
| 416 | UNIT_ASSERT_EQUAL(v.capacity(), 10); |
| 417 | v.push_back(0); |
| 418 | v.shrink_to_fit(); |
| 419 | UNIT_ASSERT_EQUAL(v.capacity(), 11); |
| 420 | } |
| 421 | |
| 422 | /* This test check a potential issue with empty base class |
| 423 | * optimization. Some compilers (VC6) do not implement it |
nothing calls this directly
no test coverage detected