]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/testDiskIO.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / tests / testDiskIO.cc
index c997d36afd755a95c3175e72c972949dee159554..4ca6179e8725a50d368ba1d87f7b088a188ee1bb 100644 (file)
@@ -1,20 +1,23 @@
-#define SQUID_UNIT_TEST 1
+/*
+ * Copyright (C) 1996-2021 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 <stdexcept>
-
-#include "testDiskIO.h"
-#include "Store.h"
-#include "SwapDir.h"
 #include "DiskIO/DiskIOModule.h"
-#include "fs/ufs/ufscommon.h"
-#include "fs/coss/CossSwapDir.h"
-#include "Mem.h"
-#include "MemObject.h"
 #include "HttpHeader.h"
 #include "HttpReply.h"
+#include "MemObject.h"
+#include "Store.h"
 #include "StoreFileSystem.h"
+#include "testDiskIO.h"
 #include "testStoreSupport.h"
+#include "unitTestMain.h"
+
+#include <stdexcept>
 
 CPPUNIT_TEST_SUITE_REGISTRATION( testDiskIO );
 
@@ -29,5 +32,12 @@ void
 testDiskIO::testFindDefault()
 {
     DiskIOModule * module = DiskIOModule::FindDefault();
+#if USE_DISKIO
+    /* enabled. we expect at least ONE */
     CPPUNIT_ASSERT(module != NULL);
+#else
+    /* disabled. we don't expect ANY */
+    CPPUNIT_ASSERT(module == NULL);
+#endif
 }
+