Ocean
Loading...
Searching...
No Matches
TestRandomI.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_RANDOM_I_H
9#define META_OCEAN_TEST_TESTBASE_TEST_RANDOM_I_H
10
13
15
16namespace Ocean
17{
18
19namespace Test
20{
21
22namespace TestBase
23{
24
25/**
26 * This class implements a integer random test.
27 * @ingroup testbase
28 */
29class OCEAN_TEST_BASE_EXPORT TestRandomI
30{
31 public:
32
33 /**
34 * Tests the entire integer random functionality.
35 * @param testDuration The number of seconds for each test, with range (0, infinity)
36 * @param selector The test selector to select the tests to run
37 * @return True, if succeeded
38 */
39 static bool test(const double testDuration, const TestSelector& selector = TestSelector());
40
41 /**
42 * Tests the random distribution of 32 bit values.
43 * @param randomGenerator Random randomGenerator object
44 * @param testDuration The number of seconds for each test, with range (0, infinity)
45 * @return True, if succeeded
46 */
47 static bool testDistribution32(RandomGenerator& randomGenerator, const double testDuration);
48
49 /**
50 * Tests the random distribution of 64 bit values.
51 * @param randomGenerator Random randomGenerator object
52 * @param testDuration The number of seconds for each test, with range (0, infinity)
53 * @return True, if succeeded
54 */
55 static bool testDistribution64(RandomGenerator& randomGenerator, const double testDuration);
56
57 /**
58 * Tests the random distribution of values with small range.
59 * @param randomGenerator Random randomGenerator object
60 * @param testDuration The number of seconds for each test, with range (0, infinity)
61 * @return True, if succeeded
62 */
63 static bool testDistributionSmallRange(RandomGenerator& randomGenerator, const double testDuration);
64
65 /**
66 * Tests the random distribution of values with large range.
67 * @param randomGenerator Random randomGenerator object
68 * @param testDuration The number of seconds for each test, with range (0, infinity)
69 * @return True, if succeeded
70 */
71 static bool testDistributionLargeRange(RandomGenerator& randomGenerator, const double testDuration);
72
73 /**
74 * Random number generator test producing one unique value.
75 * @param randomGenerator Random randomGenerator object
76 * @return True, if succeeded
77 */
78 static bool testOneParameter(RandomGenerator& randomGenerator);
79
80 /**
81 * Random number generator test allowing to create two individual random numbers.
82 * @param randomGenerator Random randomGenerator object
83 * @return True, if succeeded
84 */
85 static bool testTwoParameter(RandomGenerator& randomGenerator);
86
87 /**
88 * Random number generator test allowing to create three individual random numbers.
89 * @param randomGenerator Random randomGenerator object
90 * @return True, if succeeded
91 */
92 static bool testThreeParameter(RandomGenerator& randomGenerator);
93
94 /**
95 * Random number generator test for several individual random numbers.
96 * @param randomGenerator Random randomGenerator object
97 * @return True, if succeeded
98 */
99 static bool testSeveralParameter(RandomGenerator& randomGenerator);
100
101 /**
102 * Random number generator test for pairs.
103 * @param randomGenerator Random randomGenerator object
104 * @param testDuration The number of seconds for each test, with range (0, infinity)
105 * @return True, if succeeded
106 */
107 static bool testRandomPair(RandomGenerator& randomGenerator, const double testDuration);
108
109 /**
110 * Random number generator test for triples.
111 * @param randomGenerator Random randomGenerator object
112 * @param testDuration The number of seconds for each test, with range (0, infinity)
113 * @return True, if succeeded
114 */
115 static bool testRandomTriple(RandomGenerator& randomGenerator, const double testDuration);
116
117 /**
118 * Random number generator test for boolean.
119 * @param randomGenerator Random randomGenerator object
120 * @param testDuration The number of seconds for each test, with range (0, infinity)
121 * @return True, if succeeded
122 */
123 static bool testRandomBoolean(RandomGenerator& randomGenerator, const double testDuration);
124
125 /**
126 * Random element test based on a vector.
127 * @param randomGenerator Random randomGenerator object
128 * @param testDuration The number of seconds for each test, with range (0, infinity)
129 * @return True, if succeeded
130 */
131 static bool testRandomElementsVector(RandomGenerator& randomGenerator, const double testDuration);
132
133 /**
134 * Random element test based on an initializer list.
135 * @param randomGenerator Random randomGenerator object
136 * @param testDuration The number of seconds for each test, with range (0, infinity)
137 * @return True, if succeeded
138 */
139 static bool testRandomElementsInitializerList(RandomGenerator& randomGenerator, const double testDuration);
140
141 /**
142 * Tests extreme value ranges.
143 * @param randomGenerator Random randomGenerator object
144 * @return True, if succeeded
145 */
146 static bool testExtremeValueRange(RandomGenerator& randomGenerator);
147
148 /**
149 * Tests sequential correlation between random values.
150 * @param randomGenerator Random randomGenerator object
151 * @return True, if succeeded
152 */
153 static bool testSequentialCorrelation(RandomGenerator& randomGenerator);
154};
155
156}
157
158}
159
160}
161
162#endif // META_OCEAN_TEST_TESTBASE_TEST_RANDOM_I_H
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements a integer random test.
Definition TestRandomI.h:30
static bool testExtremeValueRange(RandomGenerator &randomGenerator)
Tests extreme value ranges.
static bool testRandomElementsInitializerList(RandomGenerator &randomGenerator, const double testDuration)
Random element test based on an initializer list.
static bool testThreeParameter(RandomGenerator &randomGenerator)
Random number generator test allowing to create three individual random numbers.
static bool testRandomBoolean(RandomGenerator &randomGenerator, const double testDuration)
Random number generator test for boolean.
static bool testOneParameter(RandomGenerator &randomGenerator)
Random number generator test producing one unique value.
static bool testRandomElementsVector(RandomGenerator &randomGenerator, const double testDuration)
Random element test based on a vector.
static bool testDistributionLargeRange(RandomGenerator &randomGenerator, const double testDuration)
Tests the random distribution of values with large range.
static bool testDistributionSmallRange(RandomGenerator &randomGenerator, const double testDuration)
Tests the random distribution of values with small range.
static bool testRandomPair(RandomGenerator &randomGenerator, const double testDuration)
Random number generator test for pairs.
static bool test(const double testDuration, const TestSelector &selector=TestSelector())
Tests the entire integer random functionality.
static bool testDistribution32(RandomGenerator &randomGenerator, const double testDuration)
Tests the random distribution of 32 bit values.
static bool testTwoParameter(RandomGenerator &randomGenerator)
Random number generator test allowing to create two individual random numbers.
static bool testSeveralParameter(RandomGenerator &randomGenerator)
Random number generator test for several individual random numbers.
static bool testRandomTriple(RandomGenerator &randomGenerator, const double testDuration)
Random number generator test for triples.
static bool testSequentialCorrelation(RandomGenerator &randomGenerator)
Tests sequential correlation between random values.
static bool testDistribution64(RandomGenerator &randomGenerator, const double testDuration)
Tests the random distribution of 64 bit values.
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