1 #include "canvas/test/CppUnit_testdriver.icpp" 2 #include <cppunit/extensions/HelperMacros.h> 5 #include "art/Persistency/Common/MapOfVectors.h" 13 typedef art::MapOfVectors<int,int>
MII;
48 int v[10] = {0,1,2,3,4,5,6,7,8,9};
50 for (
int i=0;
i<10;++
i) {
63 CPPUNIT_ASSERT(m.size()==0);
64 CPPUNIT_ASSERT(m.empty());
65 CPPUNIT_ASSERT(m.m_keys.size()==0);
66 CPPUNIT_ASSERT(m.m_offsets.size()==1);
67 CPPUNIT_ASSERT(m.m_offsets[0]==0);
68 CPPUNIT_ASSERT(m.m_data.size()==0);
74 CPPUNIT_ASSERT(m.size()==
om.size());
75 CPPUNIT_ASSERT(!m.empty());
76 CPPUNIT_ASSERT(m.m_keys.size()==
om.size());
77 CPPUNIT_ASSERT(m.m_offsets.size()==
om.size()+1);
78 CPPUNIT_ASSERT(m.m_offsets[0]==0);
79 CPPUNIT_ASSERT(m.m_offsets[m.size()]==
tot);
80 CPPUNIT_ASSERT(m.m_data.size()==
tot);
85 CPPUNIT_ASSERT(m.find(-1)==m.emptyRange());
87 MII::range
r = m.find((*p).first);
88 CPPUNIT_ASSERT(
int(r.size())==(*p).first);
89 CPPUNIT_ASSERT(std::equal((*p).second.begin(), (*p).second.end(),r.begin()));
98 CPPUNIT_ASSERT((*p).first==(*op).first);
99 CPPUNIT_ASSERT(std::equal((*p).second.begin(), (*p).second.end(),(*op).second.begin()));
100 lt+=(*p).second.size();
103 CPPUNIT_ASSERT(lt==
tot);
CPPUNIT_TEST_SUITE(TestMapOfVectors)
CPPUNIT_TEST_SUITE_REGISTRATION(TestMapOfVectors)
art::MapOfVectors< int, int > MII
auto begin(Data< Value > const &data)
CPPUNIT_TEST(default_ctor)