]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testStore.cc
5 CPPUNIT_TEST_SUITE_REGISTRATION( testStore
);
14 TestStore::get(const cache_key
*)
20 TestStore::get(String
, void (*)(StoreEntry
*, void*), void*)
28 TestStore::maxSize() const
34 TestStore::minSize() const
40 TestStore::currentSize() const
46 TestStore::currentCount() const
52 TestStore::maxObjectSize() const
58 TestStore::getStats(StoreInfoStats
&) const
63 TestStore::stat(StoreEntry
&) const
65 const_cast<TestStore
*>(this)->statsCalled
= true;
69 TestStore::search(String
const url
, HttpRequest
*)
75 testStore::testSetRoot()
77 StorePointer
aStore(new TestStore
);
80 CPPUNIT_ASSERT_EQUAL(&Store::Root(),aStore
.getRaw());
85 testStore::testUnsetRoot()
87 StorePointer
aStore(new TestStore
);
88 StorePointer
aStore2(new TestStore
);
91 CPPUNIT_ASSERT_EQUAL(&Store::Root(),aStore2
.getRaw());
96 testStore::testStats()
98 TestStorePointer
aStore(new TestStore
);
99 Store::Root(aStore
.getRaw());
100 CPPUNIT_ASSERT_EQUAL(false, aStore
->statsCalled
);
101 Store::Stats(NullStoreEntry::getInstance());
102 CPPUNIT_ASSERT_EQUAL(true, aStore
->statsCalled
);
107 testStore::testMaxSize()
109 StorePointer
aStore(new TestStore
);
110 Store::Root(aStore
.getRaw());
111 CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(3), aStore
->maxSize());