Branch Coverage

src/panda/CallbackDispatcher.h
Criterion Covered Total %
branch 185 386 47.9


line true false branch
29 3 0 struct Wrapper {
3 0 struct Wrapper {
2 0 struct Wrapper {
25 0 struct Wrapper {
7 0 struct Wrapper {
33 2 0 explicit Wrapper (Callback real) : real(real) {}
14 0 explicit Wrapper (Callback real) : real(real) {}
34 3 0 explicit Wrapper (SimpleCallback simple) : simple(simple) {}
3 0 explicit Wrapper (SimpleCallback simple) : simple(simple) {}
2 0 explicit Wrapper (SimpleCallback simple) : simple(simple) {}
11 0 explicit Wrapper (SimpleCallback simple) : simple(simple) {}
5 0 explicit Wrapper (SimpleCallback simple) : simple(simple) {}
38 0 3 if (real) return real(e, std::forward(args)...);
0 4 if (real) return real(e, std::forward(args)...);
0 0 if (real) return real(e, std::forward(args)...);
2 5 if (real) return real(e, std::forward(args)...);
11 7 if (real) return real(e, std::forward(args)...);
40 4 0 simple(args...);
51 1 0 return simple && simple == oth;
1 0 return simple && simple == oth;
1 0 return simple && simple == oth;
1 0 return simple && simple == oth;
1 0 return simple && simple == oth;
1 0 return simple && simple == oth;
2 0 return simple && simple == oth;
2 0 return simple && simple == oth;
56 1 0 return real && real == oth;
1 0 return real && real == oth;
1 0 return real && real == oth;
1 0 return real && real == oth;
4 0 return real && real == oth;
3 1 return real && real == oth;
77 0 6 if (!callback) return;
78 0 6 if (back) listeners.push_back(Wrapper(callback));
0 0 if (back) listeners.push_back(Wrapper(callback));
0 0 if (back) listeners.push_back(Wrapper(callback));
79 6 0 else listeners.push_front(Wrapper(callback));
6 0 else listeners.push_front(Wrapper(callback));
83 0 2 if (!callback) return;
0 8 if (!callback) return;
84 1 1 if (back) listeners.push_back(Wrapper(std::forward(callback)));
1 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
1 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 8 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
85 1 0 else listeners.push_front(Wrapper(std::forward(callback)));
1 0 else listeners.push_front(Wrapper(std::forward(callback)));
8 0 else listeners.push_front(Wrapper(std::forward(callback)));
8 0 else listeners.push_front(Wrapper(std::forward(callback)));
89 0 7 if (!callback) return;
0 1 if (!callback) return;
90 1 6 if (back) listeners.push_back(Wrapper(callback));
1 0 if (back) listeners.push_back(Wrapper(callback));
1 0 if (back) listeners.push_back(Wrapper(callback));
0 1 if (back) listeners.push_back(Wrapper(callback));
0 0 if (back) listeners.push_back(Wrapper(callback));
0 0 if (back) listeners.push_back(Wrapper(callback));
91 6 0 else listeners.push_front(Wrapper(callback));
6 0 else listeners.push_front(Wrapper(callback));
1 0 else listeners.push_front(Wrapper(callback));
1 0 else listeners.push_front(Wrapper(callback));
95 0 3 if (!callback) return;
0 3 if (!callback) return;
0 4 if (!callback) return;
0 2 if (!callback) return;
0 4 if (!callback) return;
96 0 3 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 3 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
2 2 if (back) listeners.push_back(Wrapper(std::forward(callback)));
2 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
2 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 2 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 4 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
0 0 if (back) listeners.push_back(Wrapper(std::forward(callback)));
97 3 0 else listeners.push_front(Wrapper(std::forward(callback)));
3 0 else listeners.push_front(Wrapper(std::forward(callback)));
3 0 else listeners.push_front(Wrapper(std::forward(callback)));
3 0 else listeners.push_front(Wrapper(std::forward(callback)));
2 0 else listeners.push_front(Wrapper(std::forward(callback)));
2 0 else listeners.push_front(Wrapper(std::forward(callback)));
2 0 else listeners.push_front(Wrapper(std::forward(callback)));
2 0 else listeners.push_front(Wrapper(std::forward(callback)));
4 0 else listeners.push_front(Wrapper(std::forward(callback)));
4 0 else listeners.push_front(Wrapper(std::forward(callback)));
100 1 0 template void add_back (T&& callback) { add(std::forward(callback), true); }
103 2 0 auto iter = listeners.begin();
2 0 auto iter = listeners.begin();
3 0 auto iter = listeners.begin();
27 0 auto iter = listeners.begin();
104 2 0 if (iter == listeners.end()) return optional_type::default_value();
2 0 if (iter == listeners.end()) return optional_type::default_value();
1 1 if (iter == listeners.end()) return optional_type::default_value();
2 0 if (iter == listeners.end()) return optional_type::default_value();
2 0 if (iter == listeners.end()) return optional_type::default_value();
0 2 if (iter == listeners.end()) return optional_type::default_value();
3 0 if (iter == listeners.end()) return optional_type::default_value();
3 0 if (iter == listeners.end()) return optional_type::default_value();
0 3 if (iter == listeners.end()) return optional_type::default_value();
27 0 if (iter == listeners.end()) return optional_type::default_value();
27 0 if (iter == listeners.end()) return optional_type::default_value();
11 16 if (iter == listeners.end()) return optional_type::default_value();
11 0 if (iter == listeners.end()) return optional_type::default_value();
106 1 0 Event e{*this, iter};
2 0 Event e{*this, iter};
3 0 Event e{*this, iter};
16 0 Event e{*this, iter};
107 1 0 return (*iter)(e, args...);
2 0 return (*iter)(e, args...);
3 0 return (*iter)(e, args...);
16 0 return (*iter)(e, args...);
112 1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
0 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
0 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
0 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
0 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
0 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
2 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
2 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
2 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
2 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
0 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
3 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
4 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
4 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
4 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
113 1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
1 0 if (iter->equal(callback)) {
2 0 if (iter->equal(callback)) {
2 0 if (iter->equal(callback)) {
4 0 if (iter->equal(callback)) {
3 1 if (iter->equal(callback)) {
114 1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
2 0 listeners.erase(iter);
2 0 listeners.erase(iter);
3 0 listeners.erase(iter);
3 0 listeners.erase(iter);
124 1 0 auto tmp = function_details::tmp_abstract_function(std::forward(makable));
125 1 0 remove(tmp);
132 1 0 auto tmp = function_details::tmp_abstract_function(std::forward(makable));
133 1 0 remove(tmp);
148 3 0 if (e.state != listeners.end()) {
2 1 if (e.state != listeners.end()) {
4 0 if (e.state != listeners.end()) {
2 2 if (e.state != listeners.end()) {
7 0 if (e.state != listeners.end()) {
4 3 if (e.state != listeners.end()) {
15 0 if (e.state != listeners.end()) {
2 13 if (e.state != listeners.end()) {