MCPcopy Create free account
hub / github.com/apache/arrow / CheckConstructFromValues

Function CheckConstructFromValues

cpp/src/arrow/util/small_vector_test.cc:269–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267
268 template <size_t N>
269 void CheckConstructFromValues() {
270 {
271 const IntVectorType<N> ints{};
272 ASSERT_EQ(ints.size(), 0);
273 ASSERT_EQ(ints.capacity(), N);
274 }
275 {
276 const IntVectorType<N> ints{IntLike(4), IntLike(5), IntLike(6)};
277 ASSERT_EQ(ints.size(), 3);
278 ASSERT_EQ(ints.capacity(), std::max<size_t>(N, 3));
279 ASSERT_EQ(ints[0], 4);
280 ASSERT_EQ(ints[1], 5);
281 ASSERT_EQ(ints[2], 6);
282 ASSERT_EQ(ints.front(), 4);
283 ASSERT_EQ(ints.back(), 6);
284 }
285 }
286
287 template <bool IsMoveOnly = Param::IsMoveOnly()>
288 void TestConstructFromValues(enable_if_t<!IsMoveOnly>* = 0) {

Callers

nothing calls this directly

Calls 3

backMethod · 0.80
sizeMethod · 0.45
capacityMethod · 0.45

Tested by

no test coverage detected