Ocean
TestRingMap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_TEST_TESTBASE_TEST_RING_MAP_H
9 #define META_OCEAN_TEST_TESTBASE_TEST_RING_MAP_H
10 
12 
13 #include "ocean/base/RingMap.h"
14 
15 namespace Ocean
16 {
17 
18 namespace Test
19 {
20 
21 namespace TestBase
22 {
23 
24 /**
25  * This class implement a test for the ring map class.
26  * @ingroup testbase
27  */
28 class OCEAN_TEST_BASE_EXPORT TestRingMap
29 {
30  protected:
31 
32  /**
33  * Definition of a ring map holding strings.
34  */
36 
37  public:
38 
39  /**
40  * Tests the ring map class.
41  * @param testDuration Number of seconds for each test, with range (0, infinity)
42  * @return True, if succeeded
43  */
44  static bool test(const double testDuration);
45 
46  /**
47  * Tests the insert function.
48  * @param testDuration Number of seconds for each test, with range (0, infinity)
49  * @return True, if succeeded
50  */
51  static bool testInsert(const double testDuration);
52 
53  /**
54  * Tests the change capacity function.
55  * @param testDuration Number of seconds for each test, with range (0, infinity)
56  * @return True, if succeeded
57  */
58  static bool testChangeCapacity(const double testDuration);
59 
60  /**
61  * Tests the check out function.
62  * @param testDuration Number of seconds for each test, with range (0, infinity)
63  * @return True, if succeeded
64  */
65  static bool testCheckout(const double testDuration);
66 
67  /**
68  * Tests the refresh function.
69  * @param testDuration Number of seconds for each test, with range (0, infinity)
70  * @return True, if succeeded
71  */
72  static bool testRefresh(const double testDuration);
73 };
74 
75 }
76 
77 }
78 
79 }
80 
81 #endif // META_OCEAN_TEST_TESTBASE_TEST_RING_MAP_H
This class implements a data storage map that stores the data elements in a ring manner.
Definition: RingMap.h:32
This class implement a test for the ring map class.
Definition: TestRingMap.h:29
static bool testInsert(const double testDuration)
Tests the insert function.
static bool test(const double testDuration)
Tests the ring map class.
static bool testCheckout(const double testDuration)
Tests the check out function.
static bool testChangeCapacity(const double testDuration)
Tests the change capacity function.
static bool testRefresh(const double testDuration)
Tests the refresh function.
RingMapT< unsigned int, std::string, false > StringMap
Definition of a ring map holding strings.
Definition: TestRingMap.h:35
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15