-#include "squid.h"
+#define SQUID_UNIT_TEST 1
+#include "squid.h"
#include "testStoreController.h"
#include "Store.h"
#include "SwapDir.h"
#include "TestSwapDir.h"
#include "Mem.h"
+#include "SquidTime.h"
#include "StoreSearch.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testStoreController );
++Config.cacheSwap.n_configured;
}
-
void
testStoreController::testStats()
{
Mem::Init();
- cbdataInit();
-
Config.Store.avgObjectSize = 1024;
Config.Store.objectsPerBucket = 20;
{
StoreEntry *e = new StoreEntry();
e->store_status = STORE_OK;
- storeSetMemStatus(e, NOT_IN_MEMORY);
+ e->setMemStatus(NOT_IN_MEMORY);
e->swap_status = SWAPOUT_DONE; /* bogus haha */
e->swap_filen = 0; /* garh - lower level*/
e->swap_dirn = -1;
- for (int i=0; i < Config.cacheSwap.n_configured; i++) {
+ for (int i=0; i < Config.cacheSwap.n_configured; ++i) {
if (INDEXSD (i) == aStore.getRaw())
e->swap_dirn = i;
}
EBIT_CLR(e->flags, KEY_PRIVATE);
e->ping_status = PING_NONE;
EBIT_CLR(e->flags, ENTRY_VALIDATED);
- storeHashInsert(e, (const cache_key *)name.buf()); /* do it after we clear KEY_PRIVATE */
+ e->hashInsert((const cache_key *)name.termedBuf()); /* do it after we clear KEY_PRIVATE */
return e;
}