Ocean
Loading...
Searching...
No Matches
TestBullseye.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#pragma once
9
11
13
15
17
18namespace Ocean
19{
20
21namespace Test
22{
23
24namespace TestCV
25{
26
27namespace TestDetector
28{
29
30namespace TestBullseyes
31{
32
33/**
34 * This class implements tests for the Bullseye class
35 * @ingroup testcvdetectorbullseyes
36 */
37class OCEAN_TEST_CV_DETECTOR_BULLSEYES_EXPORT TestBullseye
38{
39 protected:
40
41 /// Alias for the Bullseye class.
43
44 public:
45
46 /**
47 * Tests the Bullseye functions.
48 * @param testDuration Number of seconds for each test, with range (0, infinity)
49 * @return True, if succeeded
50 */
51 static bool test(const double testDuration);
52
53 /**
54 * Test for Bullseye::isValid()
55 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
56 * @param randomGenerator A random generator that will be used to generate test data
57 * @return True, if succeeded
58 */
59 static bool testBullseyeIsValid(const double testDuration, RandomGenerator& randomGenerator);
60
61 /**
62 * Test for Bullseye constructor
63 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
64 * @param randomGenerator A random generator that will be used to generate test data
65 * @return True, if succeeded
66 */
67 static bool testBullseyeConstructor(const double testDuration, RandomGenerator& randomGenerator);
68
69 /**
70 * Test for Bullseye::position()
71 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
72 * @param randomGenerator A random generator that will be used to generate test data
73 * @return True, if succeeded
74 */
75 static bool testBullseyePosition(const double testDuration, RandomGenerator& randomGenerator);
76
77 /**
78 * Test for Bullseye::radius()
79 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
80 * @param randomGenerator A random generator that will be used to generate test data
81 * @return True, if succeeded
82 */
83 static bool testBullseyeRadius(const double testDuration, RandomGenerator& randomGenerator);
84
85 /**
86 * Test for Bullseye::grayThreshold()
87 * @param testDuration The duration in seconds for which this test will be run, must be > 0.0
88 * @param randomGenerator A random generator that will be used to generate test data
89 * @return True, if succeeded
90 */
91 static bool testBullseyeGrayThreshold(const double testDuration, RandomGenerator& randomGenerator);
92};
93
94} // namespace TestBullseyes
95
96} // namespace TestDetector
97
98} // namespace TestCV
99
100} // namespace Test
101
102} // namespace Ocean
Definition of a bullseye composed of a location and a radius.
Definition Bullseye.h:32
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements tests for the Bullseye class.
Definition TestBullseye.h:38
static bool testBullseyePosition(const double testDuration, RandomGenerator &randomGenerator)
Test for Bullseye::position()
static bool testBullseyeRadius(const double testDuration, RandomGenerator &randomGenerator)
Test for Bullseye::radius()
static bool testBullseyeGrayThreshold(const double testDuration, RandomGenerator &randomGenerator)
Test for Bullseye::grayThreshold()
static bool test(const double testDuration)
Tests the Bullseye functions.
static bool testBullseyeIsValid(const double testDuration, RandomGenerator &randomGenerator)
Test for Bullseye::isValid()
static bool testBullseyeConstructor(const double testDuration, RandomGenerator &randomGenerator)
Test for Bullseye constructor.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15