10 #include <CTraitsTest.h> 11 #include <gtest/gtest.h> 21 template class mrpt::CTraitsTest<vwsso_t>;
23 TEST(vector_with_small_size_optimization, Empty)
31 TEST(vector_with_small_size_optimization, ResizeSize)
34 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
38 EXPECT_FALSE(v.
empty());
44 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
47 EXPECT_FALSE(v.
empty());
52 TEST(vector_with_small_size_optimization, ResizeWriteRead)
55 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
60 for (
size_t i = 0; i < n; i++) v[i] = i;
61 for (
size_t i = 0; i < n; i++)
EXPECT_EQ(v[i], i);
66 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
69 for (
size_t i = 0; i < n; i++) v[i] = i;
70 for (
size_t i = 0; i < n; i++)
EXPECT_EQ(v[i], i);
74 TEST(vector_with_small_size_optimization, ResizeWriteReadIterators)
77 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
82 for (
size_t i = 0; i < n; i++) v[i] = i;
85 for (
const auto&
val : v)
94 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
97 for (
size_t i = 0; i < n; i++) v[i] = i;
99 for (
const auto&
val : v)
107 TEST(vector_with_small_size_optimization, GrowCheckContents)
110 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
115 for (
size_t i = 0; i < n; i++)
EXPECT_EQ(v[i], i) <<
"n=" << n;
119 TEST(vector_with_small_size_optimization, ShrinkCheckContents)
123 for (
size_t i = 0; i < v.
size(); i++) v[i] = i;
129 for (
size_t i = 0; i < v.
size(); i++)
134 TEST(vector_with_small_size_optimization, GrowCheckFrontBack)
137 for (
size_t n = 1; n <
SMALL_LEN * 2; n++)
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
Container that transparently and dynamically switches between a std::array and std::vector.
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
const_reference front() const
const_reference back() const
constexpr size_t SMALL_LEN
TEST(vector_with_small_size_optimization, Empty)