Branch Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/CPP/panda/lib.x/i/panda/CallbackDispatcher.h
Criterion Covered Total %
branch 50 94 53.1


line true false branch
18 3 0 struct Wrapper {
22 3 0 explicit Wrapper(Callback real, SimpleCallback simple = nullptr) : real(real), simple(simple) {}
39 3 1 if (simple) {
74 0 1 if (!callback) {
77 1 0 listeners.push_back(Wrapper(std::forward(callback)));
1 0 listeners.push_back(Wrapper(std::forward(callback)));
1 0 listeners.push_back(Wrapper(std::forward(callback)));
81 2 0 if (!callback) {
0 2 if (!callback) {
87 2 0 };
92 2 0 listeners.push_back(Wrapper(wrapper, callback));
2 0 listeners.push_back(Wrapper(wrapper, callback));
2 0 listeners.push_back(Wrapper(wrapper, callback));
2 0 listeners.push_back(Wrapper(wrapper, callback));
97 7 0 auto iter = listeners.begin();
98 7 0 if (iter == listeners.end()) return optional_tools::default_value();
7 0 if (iter == listeners.end()) return optional_tools::default_value();
0 7 if (iter == listeners.end()) return optional_tools::default_value();
0 0 if (iter == listeners.end()) return optional_tools::default_value();
100 7 0 Event e{*this, iter};
101 7 0 return (*iter)(e, std::forward(args)...);
106 2 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
3 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
3 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
2 1 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
1 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
2 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
5 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
5 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
4 1 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
3 0 for (auto iter = listeners.rbegin(); iter != listeners.rend(); ++iter) {
107 2 0 if (iter->equal(callback)) {
1 1 if (iter->equal(callback)) {
4 0 if (iter->equal(callback)) {
1 3 if (iter->equal(callback)) {
108 1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
1 0 listeners.erase(iter);
118 2 0 auto tmp = tmp_abstract_function(std::forward(makable));
119 2 0 remove(tmp);
126 2 0 auto tmp = tmp_abstract_function(std::forward(makable));
127 2 0 remove(tmp);
142 8 0 if (e.state != listeners.end()) {
2 6 if (e.state != listeners.end()) {
0 0 if (e.state != listeners.end()) {
0 0 if (e.state != listeners.end()) {