-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplitAxisRoundRobinStrategyTest.hpp
More file actions
executable file
·53 lines (36 loc) · 1.48 KB
/
SplitAxisRoundRobinStrategyTest.hpp
File metadata and controls
executable file
·53 lines (36 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef ROSSB83_SPLIT_AXIS_ROUND_ROBIN_STRATEGY_TEST_HPP
#define ROSSB83_SPLIT_AXIS_ROUND_ROBIN_STRATEGY_TEST_HPP
#include <assert.h>
#include "SplitAxisRoundRobinStrategy.hpp"
namespace rossb83 {
class SplitAxisRoundRobinStrategyTest {
public:
SplitAxisRoundRobinStrategyTest() {
std::cout << "Running SplitAxis Round Robin Strategy tests..." << std::endl;
roundRobinTest();
}
private:
void roundRobinTest() {
std::cout << "split axis round robin test..." << std::endl;
strategy = std::make_shared<SplitAxisRoundRobinStrategy<int>>();
std::size_t axis1 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis2 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis3 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis4 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis5 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis6 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis7 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
std::size_t axis8 = strategy->splitAxis({{0,1,2},{1,2,2}},0,1);
assert(axis1 == 0);
assert(axis2 == 1);
assert(axis3 == 1);
assert(axis4 == 2);
assert(axis5 == 2);
assert(axis6 == 2);
assert(axis7 == 2);
assert(axis8 == 0);
}
std::shared_ptr<SplitAxisStrategy<int>> strategy;
}; // class SplitAxisRoundRobinStrategyTest
} // namespace rossb83
#endif // ROSSB83_SPLIT_AXIS_ROUND_ROBIN_STRATEGY_TEST_HPP