MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_push_back

Function test_push_back

tests/misc/containers.cpp:325–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324template<template<typename> class ContainerTemplate>
325void test_push_back() {
326 using Container = ContainerTemplate<TestItem>;
327 Container container;
328 TestItem item(42);
329 int initial_move_count = item.move_count;
330
331 container.push_back(fl::move(item));
332
333 FL_CHECK(container.size() == 1);
334 FL_CHECK(container.back().value == 42);
335 FL_CHECK(item.move_count > initial_move_count);
336 FL_CHECK(container.back().copy_count == 0);
337}
338
339template<template<typename> class ContainerTemplate>
340void test_emplace_back() {

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.45
sizeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected