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

Function test_clear

tests/misc/containers.cpp:379–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377
378template<template<typename> class ContainerTemplate>
379void test_clear() {
380 using Container = ContainerTemplate<TestItem>;
381 Container container;
382 container.push_back(fl::move(TestItem(1)));
383 container.push_back(fl::move(TestItem(2)));
384 container.push_back(fl::move(TestItem(3)));
385 FL_CHECK(container.size() == 3);
386
387 container.clear();
388 FL_CHECK(container.empty());
389 FL_CHECK(container.size() == 0);
390}
391
392// Front operations (deque, list)
393template<template<typename> class ContainerTemplate>

Callers

nothing calls this directly

Calls 5

TestItemClass · 0.85
push_backMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected