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

Function test_push_front

tests/misc/containers.cpp:394–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392// Front operations (deque, list)
393template<template<typename> class ContainerTemplate>
394void test_push_front() {
395 using Container = ContainerTemplate<TestItem>;
396 Container container;
397 TestItem item(42);
398 int initial_move_count = item.move_count;
399
400 container.push_front(fl::move(item));
401
402 FL_CHECK(container.size() == 1);
403 FL_CHECK(container.front().value == 42);
404 FL_CHECK(item.move_count > initial_move_count);
405 FL_CHECK(container.front().copy_count == 0);
406}
407
408template<template<typename> class ContainerTemplate>
409void test_emplace_front() {

Callers

nothing calls this directly

Calls 3

push_frontMethod · 0.45
sizeMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected