Ocean
Loading...
Searching...
No Matches
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
13
14#include "ocean/base/RingMap.h"
15
16namespace Ocean
17{
18
19namespace Test
20{
21
22namespace TestBase
23{
24
25/**
26 * This class implement a test for the ring map class.
27 * @ingroup testbase
28 */
29class OCEAN_TEST_BASE_EXPORT TestRingMap
30{
31 protected:
32
33 /**
34 * Definition of a ring map holding strings.
35 */
37
38 public:
39
40 /**
41 * Tests the ring map class.
42 * @param testDuration Number of seconds for each test, with range (0, infinity)
43 * @param selector The test selector to select the tests to run
44 * @return True, if succeeded
45 */
46 static bool test(const double testDuration, const TestSelector& selector = TestSelector());
47
48 /**
49 * Tests the insert function.
50 * @param testDuration Number of seconds for each test, with range (0, infinity)
51 * @return True, if succeeded
52 */
53 static bool testInsert(const double testDuration);
54
55 /**
56 * Tests the change capacity function.
57 * @param testDuration Number of seconds for each test, with range (0, infinity)
58 * @return True, if succeeded
59 */
60 static bool testChangeCapacity(const double testDuration);
61
62 /**
63 * Tests the check out function.
64 * @param testDuration Number of seconds for each test, with range (0, infinity)
65 * @return True, if succeeded
66 */
67 static bool testCheckout(const double testDuration);
68
69 /**
70 * Tests the refresh function.
71 * @param testDuration Number of seconds for each test, with range (0, infinity)
72 * @return True, if succeeded
73 */
74 static bool testRefresh(const double testDuration);
75};
76
77}
78
79}
80
81}
82
83#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:33
This class implement a test for the ring map class.
Definition TestRingMap.h:30
static bool test(const double testDuration, const TestSelector &selector=TestSelector())
Tests the ring map class.
static bool testInsert(const double testDuration)
Tests the insert function.
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.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
The namespace covering the entire Ocean framework.
Definition Accessor.h:15