diff options
Diffstat (limited to 'utils/small_vector_test.cc')
-rw-r--r-- | utils/small_vector_test.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/small_vector_test.cc b/utils/small_vector_test.cc index cded4619..a4eb89ae 100644 --- a/utils/small_vector_test.cc +++ b/utils/small_vector_test.cc @@ -82,6 +82,18 @@ BOOST_AUTO_TEST_CASE(LargerThan2) { BOOST_CHECK(cc.size() == 0); } +BOOST_AUTO_TEST_CASE(SwapSV) { + SmallVectorInt v; + SmallVectorInt v2(2, 10); + SmallVectorInt v3(2, 10); + BOOST_CHECK(v2 == v3); + BOOST_CHECK(v != v3); + v.swap(v2); + BOOST_CHECK(v == v3); + SmallVectorInt v4; + BOOST_CHECK(v4 == v2); +} + BOOST_AUTO_TEST_CASE(Small) { SmallVectorInt v; SmallVectorInt v1(1,0); |