]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testDiskIO.cc
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / tests / testDiskIO.cc
1 /*
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #include "squid.h"
10 #include "DiskIO/DiskIOModule.h"
11 #include "HttpHeader.h"
12 #include "HttpReply.h"
13 #include "MemObject.h"
14 #include "Store.h"
15 #include "StoreFileSystem.h"
16 #include "testDiskIO.h"
17 #include "testStoreSupport.h"
18 #include "unitTestMain.h"
19
20 #include <stdexcept>
21
22 CPPUNIT_TEST_SUITE_REGISTRATION( testDiskIO );
23
24 void
25 testDiskIO::setUp()
26 {
27 Mem::Init();
28 DiskIOModule::SetupAllModules();
29 }
30
31 void
32 testDiskIO::testFindDefault()
33 {
34 DiskIOModule * module = DiskIOModule::FindDefault();
35 #if USE_DISKIO
36 /* enabled. we expect at least ONE */
37 CPPUNIT_ASSERT(module != NULL);
38 #else
39 /* disabled. we don't expect ANY */
40 CPPUNIT_ASSERT(module == NULL);
41 #endif
42 }
43