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

Function test_size_and_empty

tests/misc/containers.cpp:364–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362
363template<template<typename> class ContainerTemplate>
364void test_size_and_empty() {
365 using Container = ContainerTemplate<TestItem>;
366 Container container;
367 FL_CHECK(container.empty());
368 FL_CHECK(container.size() == 0);
369
370 container.push_back(fl::move(TestItem(1)));
371 FL_CHECK(!container.empty());
372 FL_CHECK(container.size() == 1);
373
374 container.push_back(fl::move(TestItem(2)));
375 FL_CHECK(container.size() == 2);
376}
377
378template<template<typename> class ContainerTemplate>
379void test_clear() {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected