Ocean
Loading...
Searching...
No Matches
testbase/TestUtilities.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_UTILITIES_H
9#define META_OCEAN_TEST_TESTBASE_TEST_UTILITIES_H
10
13
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestBase
24{
25
26/**
27 * This class implements utilities tests.
28 * @ingroup testbase
29 */
30class OCEAN_TEST_BASE_EXPORT TestUtilities
31{
32 public:
33
34 /**
35 * Tests the entire utilities functionality.
36 * @param testDuration Number of seconds for each test, with range (0, infinity)
37 * @param selector The selector to filter individual test cases
38 * @return True, if succeeded
39 */
40 static bool test(const double testDuration, const TestSelector& selector = TestSelector());
41
42 /**
43 * Tests the min max function.
44 * @param testDuration Number of seconds for each test, with range (0, infinity)
45 * @return True, if succeeded
46 */
47 static bool testMinmax(const double testDuration);
48
49 /**
50 * Tests the modulo function.
51 * @param testDuration Number of seconds for each test, with range (0, infinity)
52 * @return True, if succeeded
53 */
54 static bool testModulo(const double testDuration);
55
56 /**
57 * Tests the ring distance function.
58 * @param testDuration Number of seconds for each test, with range (0, infinity)
59 * @return True, if succeeded
60 */
61 static bool testRingDistance(const double testDuration);
62
63 /**
64 * Tests the index mirror function.
65 * @param testDuration Number of seconds for each test, with range (0, infinity)
66 * @return True, if succeeded
67 */
68 static bool testMirrorValue(const double testDuration);
69
70 /**
71 * Tests the division by two function.
72 * @param testDuration Number of seconds for each test, with range (0, infinity)
73 * @return True, if succeeded
74 */
75 static bool testDivisionBy2(const double testDuration);
76
77 /**
78 * Tests the power of two function.
79 * @param testDuration Number of seconds for each test, with range (0, infinity)
80 * @return True, if succeeded
81 */
82 static bool testIsPowerOfTwo(const double testDuration);
83};
84
85}
86
87}
88
89}
90
91#endif // META_OCEAN_TEST_TESTBASE_TEST_UTILITIES_H
This class implements utilities tests.
Definition testbase/TestUtilities.h:31
static bool testMirrorValue(const double testDuration)
Tests the index mirror function.
static bool testModulo(const double testDuration)
Tests the modulo function.
static bool testIsPowerOfTwo(const double testDuration)
Tests the power of two function.
static bool testMinmax(const double testDuration)
Tests the min max function.
static bool test(const double testDuration, const TestSelector &selector=TestSelector())
Tests the entire utilities functionality.
static bool testDivisionBy2(const double testDuration)
Tests the division by two function.
static bool testRingDistance(const double testDuration)
Tests the ring distance 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