Branch Coverage

t/owning_list.cc
Criterion Covered Total %
branch 250 636 39.3


line true false branch
9 1 0 owning_list list;
10 1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
0 0 REQUIRE(list.size() == 0);
0 0 REQUIRE(list.size() == 0);
11 1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
0 1 for (auto iter = list.begin(); iter != list.end(); ++iter) {
0 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
12 0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
14 1 0 REQUIRE(true);
1 0 REQUIRE(true);
1 0 REQUIRE(true);
1 0 REQUIRE(true);
0 0 REQUIRE(true);
0 0 REQUIRE(true);
18 1 0 owning_list list;
19 1 0 list.push_back(10);
20 1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
21 1 0 auto iter = list.begin();
22 1 0 for (; iter != list.end(); ++iter) {
1 0 for (; iter != list.end(); ++iter) {
1 0 for (; iter != list.end(); ++iter) {
23 1 0 REQUIRE(*iter == 10);
1 0 REQUIRE(*iter == 10);
1 0 REQUIRE(*iter == 10);
1 0 REQUIRE(*iter == 10);
1 0 REQUIRE(*iter == 10);
0 0 REQUIRE(*iter == 10);
0 0 REQUIRE(*iter == 10);
26 1 0 REQUIRE(++iter == list.end());
1 0 REQUIRE(++iter == list.end());
1 0 REQUIRE(++iter == list.end());
1 0 REQUIRE(++iter == list.end());
1 0 REQUIRE(++iter == list.end());
1 0 REQUIRE(++iter == list.end());
1 0 REQUIRE(++iter == list.end());
0 0 REQUIRE(++iter == list.end());
0 0 REQUIRE(++iter == list.end());
30 1 0 owning_list list;
31 1 0 list.push_back(0);
32 1 0 list.push_back(1);
33 1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
34 1 0 auto iter = list.begin();
36 3 0 for (; iter != list.end(); ++iter) {
3 0 for (; iter != list.end(); ++iter) {
2 1 for (; iter != list.end(); ++iter) {
2 0 for (; iter != list.end(); ++iter) {
37 2 0 REQUIRE(*iter == i);
2 0 REQUIRE(*iter == i);
2 0 REQUIRE(*iter == i);
2 0 REQUIRE(*iter == i);
2 0 REQUIRE(*iter == i);
0 0 REQUIRE(*iter == i);
0 0 REQUIRE(*iter == i);
40 1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
0 0 REQUIRE(iter == list.end());
0 0 REQUIRE(iter == list.end());
44 1 0 owning_list list;
45 1 0 list.push_back(10);
46 1 0 list.remove(10);
47 1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
0 1 for (auto iter = list.begin(); iter != list.end(); ++iter) {
0 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
48 0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
0 0 FAIL("list must be empty");
50 1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
0 0 REQUIRE(list.size() == 0);
0 0 REQUIRE(list.size() == 0);
55 1 0 owning_list list;
56 1 0 list.push_back(0);
57 1 0 list.push_back(2);
58 1 0 list.remove(2);
59 1 0 list.push_back(1);
61 1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
3 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
3 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
2 1 for (auto iter = list.begin(); iter != list.end(); ++iter) {
2 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
62 2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
0 0 REQUIRE(*iter == i++);
0 0 REQUIRE(*iter == i++);
64 1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
68 1 0 owning_list list;
69 1 0 list.push_back(0);
70 1 0 list.push_back(2);
71 1 0 list.push_back(1);
72 1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
3 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
3 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
2 1 for (auto iter = list.begin(); iter != list.end(); ++iter) {
2 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
73 2 0 list.remove(2);
76 1 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
3 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
3 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
2 1 for (auto iter = list.begin(); iter != list.end(); ++iter) {
2 0 for (auto iter = list.begin(); iter != list.end(); ++iter) {
77 2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
2 0 REQUIRE(*iter == i++);
0 0 REQUIRE(*iter == i++);
0 0 REQUIRE(*iter == i++);
80 1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
84 1 0 owning_list list;
85 1 0 list.push_back(0);
86 1 0 list.push_back(1);
87 1 0 list.push_back(2);
88 1 0 auto iter = list.begin();
89 1 0 list.remove(1);
90 1 0 list.remove(2);
91 1 0 ++iter;
92 1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
1 0 REQUIRE(iter == list.end());
0 0 REQUIRE(iter == list.end());
0 0 REQUIRE(iter == list.end());
93 1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
97 1 0 owning_list list;
98 1 0 list.push_back(0);
99 1 0 list.push_back(1);
100 1 0 list.push_back(2);
101 1 0 auto iter = list.rbegin();
102 1 0 list.remove(1);
103 1 0 list.remove(2);
104 1 0 REQUIRE(*iter == 2);
1 0 REQUIRE(*iter == 2);
1 0 REQUIRE(*iter == 2);
1 0 REQUIRE(*iter == 2);
1 0 REQUIRE(*iter == 2);
0 0 REQUIRE(*iter == 2);
0 0 REQUIRE(*iter == 2);
106 1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
110 1 0 owning_list list;
111 1 0 list.push_back(0);
112 1 0 list.push_back(1);
113 1 0 list.push_back(2);
114 1 0 auto iter = list.rbegin();
115 1 0 list.remove(2);
116 1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
0 0 REQUIRE(*iter++ == 2);
0 0 REQUIRE(*iter++ == 2);
117 1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
0 0 REQUIRE(*iter++ == 1);
0 0 REQUIRE(*iter++ == 1);
118 1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
0 0 REQUIRE(*iter++ == 0);
0 0 REQUIRE(*iter++ == 0);
120 1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
124 1 0 owning_list list;
125 1 0 list.push_back(0);
126 1 0 list.push_back(1);
127 1 0 list.push_back(2);
128 1 0 auto iter = list.rbegin();
129 1 0 list.erase(iter);
1 0 list.erase(iter);
130 1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
1 0 REQUIRE(*iter++ == 2);
0 0 REQUIRE(*iter++ == 2);
0 0 REQUIRE(*iter++ == 2);
131 1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
1 0 REQUIRE(*iter++ == 1);
0 0 REQUIRE(*iter++ == 1);
0 0 REQUIRE(*iter++ == 1);
132 1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
1 0 REQUIRE(*iter++ == 0);
0 0 REQUIRE(*iter++ == 0);
0 0 REQUIRE(*iter++ == 0);
134 1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
1 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
0 0 REQUIRE(list.size() == 2);
139 1 0 owning_list list;
140 1 0 list.push_back(Tracer(0));
141 1 0 list.push_back(Tracer(1));
142 1 0 list.push_back(Tracer(2));
143 1 0 list.clear();
144 1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
0 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
0 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls);
147 1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
1 0 REQUIRE(list.size() == 0);
0 0 REQUIRE(list.size() == 0);
0 0 REQUIRE(list.size() == 0);
152 1 0 owning_list list;
153 1 0 list.push_back(Tracer(0));
154 1 0 list.push_back(Tracer(1));
155 1 0 list.push_back(Tracer(2));
156 1 0 list.remove(Tracer(0));
157 1 0 list.remove(Tracer(2));
158 1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
1 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
0 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
0 0 REQUIRE(Tracer::ctor_total() == Tracer::dtor_calls + 1);
161 1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
1 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
0 0 REQUIRE(list.size() == 1);
162 18 0 }
18 0 }