Branch Coverage

src/xs/typemap/object.cc
Criterion Covered Total %
branch 30 70 42.8


line true false branch
18 6135 5289019 for (; mg; mg = mg->mg_moremagic) {
19 6128 7 if (mg->mg_virtual && mg->mg_virtual->svt_copy == backref_marker) {
18 6110 if (mg->mg_virtual && mg->mg_virtual->svt_copy == backref_marker) {
20 7 11 if (mg->mg_virtual->svt_local(aTHX_ sv, mg)) return TRUE;
23 0 5289019 if (orig_destroy_hook) return orig_destroy_hook(aTHX_ sv);
28 36 0 Stash stash("XS::Framework", GV_ADD);
30 36 0 fake_dtor = newCONSTSUB(stash, "__FAKE_DTOR", newSViv(0));
36 0 fake_dtor = newCONSTSUB(stash, "__FAKE_DTOR", newSViv(0));
33 0 36 if (PL_destroyhook != &Perl_sv_destroyable) orig_destroy_hook = PL_destroyhook;
40 24 0 char* class_name = abi::__cxa_demangle(ti.name(), nullptr, nullptr, &status);
41 0 24 if (status != 0) {
42 0 0 r += "[abi::__cxa_demangle error] ";
43 0 0 r += ti.name();
46 24 0 r += class_name;
54 0 0 exc += type_details(ti);
0 0 exc += type_details(ti);
55 0 0 exc += "', either define it or explicitly bless PROTO on output";
56 0 0 throw exc;
62 0 24 if (!arg) { arg_type = "NULL"; }
0 0 if (!arg) { arg_type = "NULL"; }
65 0 24 if (!sv.is_object() && !sv.is_object_ref()) {
0 0 if (!sv.is_object() && !sv.is_object_ref()) {
0 24 if (!sv.is_object() && !sv.is_object_ref()) {
66 0 0 arg_type = "not an object";
69 24 0 Object obj(sv);
70 24 0 arg_type = obj.stash().name();
24 0 arg_type = obj.stash().name();
74 24 0 ex_details += arg_type;
75 24 0 ex_details += "' to expected '";
76 24 0 ex_details += package;
77 24 0 ex_details += "' (C++ type '" + type_details(expected) + "')";
24 0 ex_details += "' (C++ type '" + type_details(expected) + "')";
24 0 ex_details += "' (C++ type '" + type_details(expected) + "')";
24 0 ex_details += "' (C++ type '" + type_details(expected) + "')";
78 24 0 throw ex_details;