Directory: | ./ |
---|---|
File: | tests/test-intervals.cc |
Date: | 2024-08-10 11:29:48 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 182 | 182 | 100.0% |
Branches: | 527 | 1048 | 50.3% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | // | ||
2 | // Copyright (c) 2014 CNRS | ||
3 | // Authors: Florent Lamiraux | ||
4 | // | ||
5 | |||
6 | // Redistribution and use in source and binary forms, with or without | ||
7 | // modification, are permitted provided that the following conditions are | ||
8 | // met: | ||
9 | // | ||
10 | // 1. Redistributions of source code must retain the above copyright | ||
11 | // notice, this list of conditions and the following disclaimer. | ||
12 | // | ||
13 | // 2. Redistributions in binary form must reproduce the above copyright | ||
14 | // notice, this list of conditions and the following disclaimer in the | ||
15 | // documentation and/or other materials provided with the distribution. | ||
16 | // | ||
17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
20 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
21 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
25 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
28 | // DAMAGE. | ||
29 | |||
30 | #define BOOST_TEST_MODULE intervals | ||
31 | #include <boost/test/included/unit_test.hpp> | ||
32 | |||
33 | #include "continuous-validation/intervals.hh" | ||
34 | |||
35 | using hpp::core::interval_t; | ||
36 | using hpp::core::continuousValidation::Intervals; | ||
37 | |||
38 | 1027 | bool checkIntervals(const Intervals& intervals) { | |
39 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 1027 times.
|
1027 | if (intervals.list().empty()) return true; |
40 | 1027 | std::list<interval_t>::const_iterator it = intervals.list().begin(); | |
41 | 1027 | std::list<interval_t>::const_iterator it1 = it; | |
42 | |||
43 |
2/2✓ Branch 3 taken 11997 times.
✓ Branch 4 taken 1027 times.
|
13024 | while (it1 != intervals.list().end()) { |
44 |
6/12✓ Branch 1 taken 11997 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 11997 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 11997 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 11997 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 11997 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 11997 times.
|
11997 | BOOST_CHECK(it1->first <= it1->second); |
45 | 11997 | ++it1; | |
46 |
2/2✓ Branch 3 taken 10970 times.
✓ Branch 4 taken 1027 times.
|
11997 | if (it1 != intervals.list().end()) { |
47 |
6/12✓ Branch 1 taken 10970 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 10970 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 10970 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 10970 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 10970 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 10970 times.
|
10970 | BOOST_CHECK(it->second < it1->first); |
48 | 10970 | it = it1; | |
49 | } | ||
50 | } | ||
51 | 1027 | return true; | |
52 | } | ||
53 | |||
54 | BOOST_AUTO_TEST_SUITE(test_hpp_core) | ||
55 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(intervals_1) { |
56 | 2 | Intervals intervals; | |
57 | |||
58 | 2 | interval_t interval(4, 5); | |
59 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
60 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
61 | |||
62 | 2 | interval = interval_t(2, 3); | |
63 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
64 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
65 | |||
66 | 2 | interval = interval_t(6, 7); | |
67 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
68 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
69 | |||
70 | 2 | interval = interval_t(0, 1); | |
71 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
72 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
73 | |||
74 |
6/12✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1 times.
|
2 | BOOST_CHECK(intervals.list().size() == 4); |
75 | 2 | std::list<interval_t>::const_iterator it = intervals.list().begin(); | |
76 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 0); |
77 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 1); |
78 | 2 | ++it; | |
79 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 2); |
80 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 3); |
81 | 2 | ++it; | |
82 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 4); |
83 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 5); |
84 | 2 | ++it; | |
85 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 6); |
86 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 7); |
87 | 2 | } | |
88 | |||
89 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(intervals_2) { |
90 | 2 | Intervals intervals; | |
91 | |||
92 | 2 | interval_t interval(0, 1); | |
93 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
94 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
95 | |||
96 | 2 | interval = interval_t(2, 3); | |
97 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
98 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
99 | |||
100 | 2 | interval = interval_t(4, 5); | |
101 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
102 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
103 | |||
104 | 2 | interval = interval_t(6, 7); | |
105 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
106 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
107 | |||
108 | 2 | interval = interval_t(1.5, 3.5); | |
109 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
110 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
111 | |||
112 |
6/12✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1 times.
|
2 | BOOST_CHECK(intervals.list().size() == 4); |
113 | 2 | std::list<interval_t>::const_iterator it = intervals.list().begin(); | |
114 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 0); |
115 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 1); |
116 | 2 | ++it; | |
117 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 1.5); |
118 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 3.5); |
119 | 2 | ++it; | |
120 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 4); |
121 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 5); |
122 | 2 | ++it; | |
123 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 6); |
124 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 7); |
125 | 2 | } | |
126 | |||
127 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(intervals_3) { |
128 | 2 | Intervals intervals; | |
129 | |||
130 | 2 | interval_t interval(4, 5); | |
131 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
132 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
133 | |||
134 | 2 | interval = interval_t(2, 3); | |
135 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
136 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
137 | |||
138 | 2 | interval = interval_t(6, 7); | |
139 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
140 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
141 | |||
142 | 2 | interval = interval_t(0, 1); | |
143 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
144 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
145 | |||
146 | 2 | interval = interval_t(0.2, 0.3); | |
147 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
148 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
149 | |||
150 |
6/12✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1 times.
|
2 | BOOST_CHECK(intervals.list().size() == 4); |
151 | 2 | std::list<interval_t>::const_iterator it = intervals.list().begin(); | |
152 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 0); |
153 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 1); |
154 | 2 | ++it; | |
155 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 2); |
156 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 3); |
157 | 2 | ++it; | |
158 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 4); |
159 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 5); |
160 | 2 | ++it; | |
161 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 6); |
162 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 7); |
163 | 2 | } | |
164 | |||
165 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(intervals_4) { |
166 | 2 | Intervals intervals; | |
167 | |||
168 | 2 | interval_t interval(4, 5); | |
169 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
170 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
171 | |||
172 | 2 | interval = interval_t(2, 3); | |
173 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
174 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
175 | |||
176 | 2 | interval = interval_t(6, 7); | |
177 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
178 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
179 | |||
180 | 2 | interval = interval_t(0, 1); | |
181 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
182 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
183 | |||
184 | 2 | interval = interval_t(2.8, 3.2); | |
185 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
186 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
187 | |||
188 |
6/12✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1 times.
|
2 | BOOST_CHECK(intervals.list().size() == 4); |
189 | 2 | std::list<interval_t>::const_iterator it = intervals.list().begin(); | |
190 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 0); |
191 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 1); |
192 | 2 | ++it; | |
193 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 2); |
194 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 3.2); |
195 | 2 | ++it; | |
196 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 4); |
197 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 5); |
198 | 2 | ++it; | |
199 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 6); |
200 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 7); |
201 | 2 | } | |
202 | |||
203 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(intervals_5) { |
204 | 2 | Intervals intervals; | |
205 | |||
206 | 2 | interval_t interval(4, 5); | |
207 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
208 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
209 | |||
210 | 2 | interval = interval_t(2, 3); | |
211 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
212 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
213 | |||
214 | 2 | interval = interval_t(6, 7); | |
215 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
216 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
217 | |||
218 | 2 | interval = interval_t(0, 1); | |
219 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
220 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
221 | |||
222 | 2 | interval = interval_t(1.5, 6.5); | |
223 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
224 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
225 | |||
226 |
6/12✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 1 times.
|
2 | BOOST_CHECK(intervals.list().size() == 2); |
227 | 2 | std::list<interval_t>::const_iterator it = intervals.list().begin(); | |
228 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 0); |
229 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 1); |
230 | 2 | ++it; | |
231 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->first, 1.5); |
232 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
|
2 | BOOST_CHECK_EQUAL(it->second, 7); |
233 | 2 | } | |
234 | |||
235 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(interval_6) { |
236 | 2 | Intervals intervals; | |
237 | |||
238 | 2 | interval_t interval(0, 1); | |
239 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
240 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
241 | |||
242 | 2 | interval = interval_t(2, 3); | |
243 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
244 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
245 | |||
246 | 2 | interval = interval_t(1, 2); | |
247 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | intervals.unionInterval(interval); |
248 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkIntervals(intervals); |
249 | |||
250 |
5/10✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
|
2 | BOOST_TEST_MESSAGE(intervals); |
251 | 2 | } | |
252 | |||
253 |
33/66✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 27 taken 1 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 1 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 77 taken 1 times.
✗ Branch 78 not taken.
✓ Branch 80 taken 1 times.
✗ Branch 81 not taken.
✓ Branch 83 taken 1 times.
✗ Branch 84 not taken.
✓ Branch 86 taken 1 times.
✗ Branch 87 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 95 taken 1 times.
✗ Branch 96 not taken.
✓ Branch 98 taken 1 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 1 times.
✗ Branch 103 not taken.
✓ Branch 105 taken 1 times.
✗ Branch 106 not taken.
✓ Branch 108 taken 1 times.
✗ Branch 109 not taken.
✓ Branch 111 taken 1 times.
✗ Branch 112 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
|
4 | BOOST_AUTO_TEST_CASE(interval_7) { |
254 | using hpp::core::value_type; | ||
255 | 2 | Intervals intervals; | |
256 | 2 | interval_t interval(0, 0); | |
257 | |||
258 |
2/2✓ Branch 0 taken 1000 times.
✓ Branch 1 taken 1 times.
|
2002 | for (unsigned int i = 0; i < 1000; ++i) { |
259 | 2000 | value_type t = (1. * rand()) / RAND_MAX; | |
260 | 2000 | value_type l = .01 * rand() / RAND_MAX; | |
261 | |||
262 | 2000 | interval.first = t - l; | |
263 | 2000 | interval.second = t + l; | |
264 |
1/2✓ Branch 1 taken 1000 times.
✗ Branch 2 not taken.
|
2000 | intervals.unionInterval(interval); |
265 |
1/2✓ Branch 1 taken 1000 times.
✗ Branch 2 not taken.
|
2000 | checkIntervals(intervals); |
266 |
6/12✓ Branch 1 taken 1000 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1000 times.
✗ Branch 6 not taken.
✓ Branch 11 taken 1000 times.
✗ Branch 12 not taken.
✓ Branch 15 taken 1000 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1000 times.
✗ Branch 19 not taken.
✗ Branch 23 not taken.
✓ Branch 24 taken 1000 times.
|
2000 | BOOST_CHECK(intervals.contains(interval)); |
267 | } | ||
268 | 2 | } | |
269 | |||
270 | BOOST_AUTO_TEST_SUITE_END() | ||
271 |