#include "TestUtils/ProviderList.h"
#include <cetlib/quiet_unit_test.hpp>
#include <set>
#include <memory>
Go to the source code of this file.
#define BOOST_TEST_MODULE ProviderList_test |
BOOST_AUTO_TEST_CASE |
( |
ProviderListTest |
| ) |
|
Definition at line 186 of file ProviderList_test.cc.
188 BOOST_TEST_MESSAGE(
"Construction and instantiation of ProviderList");
189 auto l = std::make_unique<testing::ProviderList>();
201 BOOST_TEST_MESSAGE(
"Constant list test");
203 BOOST_TEST_MESSAGE(
"Mutable list test");
206 BOOST_TEST_MESSAGE(
"ProviderListTest completed");
static std::unique_ptr< PinnedDatumClass > New(float x, float y)
std::set< void * > TrackedMemory
static unsigned int nNewCalls
void NonConstTest(testing::ProviderList &l)
void ConstTest(testing::ProviderList const &l)
Definition at line 155 of file ProviderList_test.cc.
159 TestElement<UncopiableDatumClass>(
l,
"Acquired",
false);
163 l.acquire(std::make_unique<UncopiableDatumClass>
164 (
"another uncopiable"),
"Acquired")
166 TestElement<UncopiableDatumClass>(
l,
"Acquired",
true);
170 TestElement<UncopiableDatumClass>(
l,
"Acquired",
false);
174 TestElement<UncopiableDatumClass>(
l,
"Acquired",
false);
178 TestElement<UncopiableDatumClass>(
l,
"Never",
false);
template<typename LIST >
void TestBase |
( |
LIST & |
l | ) |
|
Definition at line 137 of file ProviderList_test.cc.
139 TestElement<NormalDatumClass>(
l);
140 TestElement<UncopiableDatumClass>(
l,
"",
false);
141 TestElement<UncopiableDatumClass>(
l,
"One");
142 TestElement<UncopiableDatumClass>(
l,
"Two",
false);
143 TestElement<UnmovableDatumClass>(
l);
144 TestElement<PinnedDatumClass>(
l);
145 TestElement<PinnedDatumClassBase>(
l);
146 TestElement<int>(
l,
"",
false);
149 BOOST_CHECK(!l.template get<PinnedDatumClassBase>().abstract());
template<typename T , typename LIST >
Definition at line 118 of file ProviderList_test.cc.
120 BOOST_TEST_MESSAGE(
"Testing class '" <<
typeid(
T).
name() <<
"' label \"" 121 <<
label <<
"\" (" << (
present?
"present":
"not present") <<
")" );
125 auto const& item =
l.template get<T>(
label);
Exception thrown on a request about an unregistered type.
constexpr ProductStatus present() noexcept
std::set<void*> TrackedMemory |