]> git.ipfire.org Git - thirdparty/squid.git/blame - src/tests/testDiskIO.cc
Maintenance: Removed most NULLs using modernize-use-nullptr (#1075)
[thirdparty/squid.git] / src / tests / testDiskIO.cc
CommitLineData
4e0938ef 1/*
bf95c10a 2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
4e0938ef
AJ
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
582c2af2 9#include "squid.h"
58e4a8e6 10#include "DiskIO/DiskIOModule.h"
58e4a8e6 11#include "HttpHeader.h"
12#include "HttpReply.h"
602d9612
A
13#include "MemObject.h"
14#include "Store.h"
58e4a8e6 15#include "StoreFileSystem.h"
602d9612 16#include "testDiskIO.h"
58e4a8e6 17#include "testStoreSupport.h"
7f861c77
AJ
18#include "unitTestMain.h"
19
27e059d4 20#include <stdexcept>
27e059d4 21
58e4a8e6 22CPPUNIT_TEST_SUITE_REGISTRATION( testDiskIO );
23
16555581 24void
25testDiskIO::setUp()
26{
58e4a8e6 27 Mem::Init();
28 DiskIOModule::SetupAllModules();
16555581 29}
58e4a8e6 30
31void
32testDiskIO::testFindDefault()
33{
34 DiskIOModule * module = DiskIOModule::FindDefault();
633c035d 35#if USE_DISKIO
09c5ae5a 36 /* enabled. we expect at least ONE */
aee3523a 37 CPPUNIT_ASSERT(module != nullptr);
633c035d 38#else
09c5ae5a 39 /* disabled. we don't expect ANY */
633c035d
AJ
40 CPPUNIT_ASSERT(module == NULL);
41#endif
58e4a8e6 42}
f53969cc 43