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