Ocean
Loading...
Searching...
No Matches
TestSubset.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_SUBSET_H
9#define META_OCEAN_TEST_TESTBASE_TEST_SUBSET_H
10
13
14namespace Ocean
15{
16
17namespace Test
18{
19
20namespace TestBase
21{
22
23/**
24 * This class implements tests for the Subset class.
25 * @ingroup testbase
26 */
27class OCEAN_TEST_BASE_EXPORT TestSubset
28{
29 public:
30
31 /**
32 * Tests all subset functions.
33 * @param testDuration The number of seconds for each test, with range (0, infinity)
34 * @param selector Test selector for filtering sub-tests; default runs all tests
35 * @return True, if succeeded
36 */
37 static bool test(const double testDuration, const TestSelector& selector = TestSelector());
38
39 /**
40 * Tests the normal subset function.
41 * @param testDuration The number of seconds for each test, with range (0, infinity)
42 * @return True, if succeeded
43 */
44 static bool testSubset(const double testDuration);
45
46 /**
47 * Tests the inverted subset function.
48 * @param testDuration The number of seconds for each test, with range (0, infinity)
49 * @return True, if succeeded
50 */
51 static bool testInvertedSubset(const double testDuration);
52
53 /**
54 * Tests the hasIntersectingElement() function.
55 * @param testDuration The number of seconds for each test, with range (0, infinity)
56 * @return True, if succeeded
57 */
58 static bool hasIntersectingElement(const double testDuration);
59
60 protected:
61
62 /**
63 * Tests the subset function for indices.
64 * @param testDuration The number of seconds for the test, with range (0, infinity)
65 * @return True, if succeeded
66 * @tparam TIndex The data type of an index
67 */
68 template <typename TIndex>
69 static bool testSubset(const double testDuration);
70
71 /**
72 * Tests the inverted subset function.
73 * @param testDuration The number of seconds for the test, with range (0, infinity)
74 * @return True, if succeeded
75 * @tparam TIndex The data type of an index
76 */
77 template <typename TIndex>
78 static bool testInvertedSubset(const double testDuration);
79};
80
81}
82
83}
84
85}
86
87#endif // META_OCEAN_TEST_TESTBASE_TEST_SUBSET_H
This class implements tests for the Subset class.
Definition TestSubset.h:28
static bool testInvertedSubset(const double testDuration)
Tests the inverted subset function.
static bool hasIntersectingElement(const double testDuration)
Tests the hasIntersectingElement() function.
static bool testSubset(const double testDuration)
Tests the subset function for indices.
static bool test(const double testDuration, const TestSelector &selector=TestSelector())
Tests all subset functions.
static bool testInvertedSubset(const double testDuration)
Tests the inverted subset function.
static bool testSubset(const double testDuration)
Tests the normal subset 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