Branch Coverage

src/panda/intrusive_chain.h
Criterion Covered Total %
branch 165 222 74.3


line true false branch
65 1 2 if (current) current = intrusive_chain_prev(current);
1 2 if (current) current = intrusive_chain_prev(current);
1 2 if (current) current = intrusive_chain_prev(current);
1 2 if (current) current = intrusive_chain_prev(current);
103 32 9 for (const T& node : il) push_back(node);
32 0 for (const T& node : il) push_back(node);
32 9 for (const T& node : il) push_back(node);
32 0 for (const T& node : il) push_back(node);
32 9 for (const T& node : il) push_back(node);
32 0 for (const T& node : il) push_back(node);
32 9 for (const T& node : il) push_back(node);
32 0 for (const T& node : il) push_back(node);
126 12 30 if (!_size++) {
12 30 if (!_size++) {
12 30 if (!_size++) {
12 30 if (!_size++) {
131 30 0 intrusive_chain_next(node, T());
137 1 3 if (!_size++) {
1 3 if (!_size++) {
1 3 if (!_size++) {
1 3 if (!_size++) {
141 3 0 intrusive_chain_prev(node, T());
149 1 5 if (head == tail) {
1 5 if (head == tail) {
1 5 if (head == tail) {
1 5 if (head == tail) {
150 1 0 head = tail = T();
156 5 0 intrusive_chain_next(tail, T());
157 5 0 intrusive_chain_prev(removed, T());
164 3 5 if (head == tail) {
3 5 if (head == tail) {
3 5 if (head == tail) {
3 5 if (head == tail) {
165 3 0 head = tail = T();
171 5 0 intrusive_chain_prev(head, T());
172 5 0 intrusive_chain_next(removed, T());
178 4 3 if (pos) {
4 3 if (pos) {
4 3 if (pos) {
4 3 if (pos) {
180 2 2 if (prev) {
2 2 if (prev) {
182 2 0 intrusive_chain_prev(node, prev);
183 2 0 intrusive_chain_next(node, pos);
184 2 0 intrusive_chain_next(prev, node);
185 2 0 intrusive_chain_prev(pos, node);
187 2 0 else push_front(node);
2 0 else push_front(node);
2 0 else push_front(node);
197 2 13 if (!pos) return end();
2 0 if (!pos) return end();
2 13 if (!pos) return end();
2 0 if (!pos) return end();
2 13 if (!pos) return end();
2 0 if (!pos) return end();
2 13 if (!pos) return end();
2 0 if (!pos) return end();
199 13 0 auto prev = intrusive_chain_prev(pos);
200 13 0 auto next = intrusive_chain_next(pos);
202 6 7 if (!prev) {
6 7 if (!prev) {
203 3 3 if (!next && pos != head) return end(); // element is not in container
1 2 if (!next && pos != head) return end(); // element is not in container
1 0 if (!next && pos != head) return end(); // element is not in container
3 3 if (!next && pos != head) return end(); // element is not in container
1 2 if (!next && pos != head) return end(); // element is not in container
1 5 if (!next && pos != head) return end(); // element is not in container
1 0 if (!next && pos != head) return end(); // element is not in container
3 3 if (!next && pos != head) return end(); // element is not in container
1 2 if (!next && pos != head) return end(); // element is not in container
1 5 if (!next && pos != head) return end(); // element is not in container
1 0 if (!next && pos != head) return end(); // element is not in container
3 3 if (!next && pos != head) return end(); // element is not in container
1 2 if (!next && pos != head) return end(); // element is not in container
1 0 if (!next && pos != head) return end(); // element is not in container
204 5 0 pop_front();
5 0 pop_front();
5 0 pop_front();
5 0 pop_front();
205 5 0 return begin();
5 0 return begin();
5 0 return begin();
5 0 return begin();
208 3 4 if (!next) {
3 4 if (!next) {
3 4 if (!next) {
3 4 if (!next) {
209 3 0 pop_back();
3 0 pop_back();
3 0 pop_back();
3 0 pop_back();
210 3 0 return end();
3 0 return end();
3 0 return end();
3 0 return end();
213 4 0 intrusive_chain_next(prev, next);
4 0 intrusive_chain_next(prev, next);
214 4 0 intrusive_chain_prev(next, prev);
4 0 intrusive_chain_prev(next, prev);
215 4 0 intrusive_chain_next(pos, T());
4 0 intrusive_chain_next(pos, T());
216 4 0 intrusive_chain_prev(pos, T());
4 0 intrusive_chain_prev(pos, T());
225 30 15 for (auto node = head; node;) {
30 15 for (auto node = head; node;) {
30 15 for (auto node = head; node;) {
30 15 for (auto node = head; node;) {
227 30 0 intrusive_chain_next(node, T());
228 30 0 intrusive_chain_prev(node, T());
229 30 0 node = next;
231 15 0 head = tail = T();