-#define SQUID_UNIT_TEST 1
-#include "squid.h"
+/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+#include "squid.h"
#include "DiskIO/DiskIOModule.h"
#include "fs/ufs/UFSSwapDir.h"
#include "globals.h"
#include "HttpHeader.h"
#include "HttpReply.h"
-#include "Mem.h"
#include "MemObject.h"
#include "RequestFlags.h"
#include "SquidConfig.h"
#include "SwapDir.h"
#include "testStoreSupport.h"
#include "testUfs.h"
+#include "unitTestMain.h"
#include <stdexcept>
CPPUNIT_TEST_SUITE_REGISTRATION( testUfs );
typedef RefCount<Fs::Ufs::UFSSwapDir> SwapDirPointer;
-extern REMOVALPOLICYCREATE createRemovalPolicy_lru; /* XXX fails with --enable-removal-policies=heap */
+extern REMOVALPOLICYCREATE createRemovalPolicy_lru; /* XXX fails with --enable-removal-policies=heap */
static void
addSwapDir(SwapDirPointer aStore)
comm_init();
- httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
+ httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
- httpReplyInitModule(); /* must go before accepting replies */
+ httpReplyInitModule(); /* must go before accepting replies */
inited = true;
}
RequestFlags flags;
flags.cachable = true;
StoreEntry *pe = storeCreateEntry("dummy url", "dummy log url", flags, Http::METHOD_GET);
- HttpReply *rep = (HttpReply *) pe->getReply(); // bypass const
+ HttpReply *rep = (HttpReply *) pe->getReply(); // bypass const
rep->setHeaders(Http::scOkay, "dummy test object", "x-squid-internal/test", 0, -1, squid_curtime + 100000);
pe->setPublicKey();
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
}
+