void TestBundleList::orderTest(void) { DerivedBundleList &l = (*list); CPPUNIT_ASSERT(l.counter == 0); genbundles(l, 1000, 0, 500); genbundles(l, 1000, 600, 1000); for (int i = 0; i < 550; i++) { l.expire(i); } CPPUNIT_ASSERT(l.counter == 1000); for (int i = 0; i < 1050; i++) { l.expire(i); } CPPUNIT_ASSERT(l.counter == 2000); }
void TestBundleSet::orderTest(void) { ExpiredBundleCounter ebc; dtn::data::BundleSet l(&ebc); CPPUNIT_ASSERT(ebc.counter == 0); genbundles(l, 1000, 0, 500); genbundles(l, 1000, 600, 1000); for (int i = 0; i < 550; ++i) { l.expire(i); } CPPUNIT_ASSERT(ebc.counter == 1000); for (int i = 0; i < 1050; ++i) { l.expire(i); } CPPUNIT_ASSERT(ebc.counter == 2000); }