]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testRock.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / tests / testRock.h
1 /*
2 * Copyright (C) 1996-2023 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 #ifndef SQUID_SRC_TEST_TESTROCK_H
10 #define SQUID_SRC_TEST_TESTROCK_H
11
12 #include "compat/cppunit.h"
13
14 /*
15 * test the store framework
16 */
17
18 class testRock : public CPPUNIT_NS::TestFixture
19 {
20 CPPUNIT_TEST_SUITE( testRock );
21 CPPUNIT_TEST( testRockCreate );
22 CPPUNIT_TEST( testRockSwapOut );
23 CPPUNIT_TEST_SUITE_END();
24
25 public:
26 testRock() : rr(nullptr) {}
27 void setUp() override;
28 void tearDown() override;
29
30 typedef RefCount<Rock::SwapDir> SwapDirPointer;
31
32 protected:
33 void commonInit();
34 void storeInit();
35 StoreEntry *createEntry(const int i);
36 StoreEntry *addEntry(const int i);
37 StoreEntry *getEntry(const int i);
38 void testRockCreate();
39 void testRockSwapOut();
40
41 private:
42 SwapDirPointer store;
43 Rock::SwapDirRr *rr;
44 };
45
46 #endif /* SQUID_SRC_TEST_TESTROCK_H */
47