Branch Coverage

t/typemap/callback_dispatcher.xs
Criterion Covered Total %
branch 62 118 52.5


line true false branch
27 1 0 struct DispatchingObject {
1 0 struct DispatchingObject {
1 0 struct DispatchingObject {
1 0 struct DispatchingObject {
1 0 struct DispatchingObject {
1 0 struct DispatchingObject {
1 0 struct DispatchingObject {
56 1 0
1 0
59 55 0 RETVAL = XSCallbackDispatcher::create(THIS->vs);
48 7 RETVAL = XSCallbackDispatcher::create(THIS->vs);
60 48 0 else if (type == "nullptr")
61 7 0 RETVAL = XSCallbackDispatcher::create(THIS->vs, nullptr);
2 5 RETVAL = XSCallbackDispatcher::create(THIS->vs, nullptr);
62 2 0 else if (type == "pair_inout")
63 5 0 RETVAL = XSCallbackDispatcher::create(THIS->vs, std::make_pair(
2 3 RETVAL = XSCallbackDispatcher::create(THIS->vs, std::make_pair(
64 2 0 [](string str) { return Simple(str + " custom_out"); },
65 1 0 [](const Sv& sv) { return xs::in(sv) + " custom_in"; }
66 1 0 ));
68 3 0 RETVAL = XSCallbackDispatcher::create(THIS->vs, std::make_pair(
1 2 RETVAL = XSCallbackDispatcher::create(THIS->vs, std::make_pair(
69 1 0 [](string str) { return Simple(str + " custom_out"); },
70 1 0 nullptr
73 2 0 RETVAL = XSCallbackDispatcher::create(THIS->vs, std::make_pair(
2 0 RETVAL = XSCallbackDispatcher::create(THIS->vs, std::make_pair(
74 2 0 nullptr,
76 1 0 ));
86 2 0 [](const int& v) { return xs::out(v); },
87 1 0 [](const Sv& sv) { return xs::in(sv); }
97 14 0 RETVAL = XSCallbackDispatcher::create(THIS->is);
8 6 RETVAL = XSCallbackDispatcher::create(THIS->is);
98 8 0 else if (type == "nullptr")
99 6 0 RETVAL = XSCallbackDispatcher::create(THIS->is, nullptr);
2 4 RETVAL = XSCallbackDispatcher::create(THIS->is, nullptr);
100 2 0 else if (type == "ret_inout")
101 4 0 RETVAL = XSCallbackDispatcher::create(THIS->is, std::make_pair(
2 2 RETVAL = XSCallbackDispatcher::create(THIS->is, std::make_pair(
102 2 0 [](panda::optional val) { return val ? Simple(*val + 100) : Simple::undef; },
103 1 0 [](const Sv& sv) { return xs::in(sv) + 10; }
106 2 0 RETVAL = XSCallbackDispatcher::create(THIS->is, std::make_pair(
2 0 RETVAL = XSCallbackDispatcher::create(THIS->is, std::make_pair(
107 2 0 [](panda::optional val) { return val ? Simple(*val + 100) : Simple::undef; },
108 1 0 [](const Sv& sv) { return xs::in(sv) + 10; }
111 1 0 [](const Sv& sv) { return xs::in(sv) + " custom_in"; }
112 1 0 ));
123 4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
0 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
4 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
0 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
0 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
0 0 [](const Sv& arg) { return NoTmStruct { xs::in(arg) + "i" }; }
124 4 0 );
126 4 0 }