t/typemap/ref.cc

filter: Statementstmt 100% 62 / 62 Branchbran 44.6% 185 / 414 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 51.8% 247 / 476 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/svapi/stash.cc ↑ Summary t/svapi/object.cc »
1 #include <catch2/catch_test_macros.hpp>
2 #include <xs.h>
3  
4 using namespace xs;
5 using namespace panda;
6  
7 namespace {
8 struct RefOnly {
9 string s;
10 1 RefOnly (string s) : s(s) {}
11 };
12  
13 struct ValOnly {
14 string s;
15 2 ValOnly (string s) : s(s) {}
16 };
17  
18 struct RefAndVal {
19 string s;
20 2 RefAndVal (string s) : s(s) {}
21 };
22  
23 struct PtrOnly {
24 string s;
25 1 PtrOnly (string s) : s(s) {}
26 };
27  
28 struct PtrAndVal {
29 string s;
30 2 PtrAndVal (string s) : s(s) {}
31 };
32  
33 struct RefAndPtr {
34 string s;
35 2 RefAndPtr (string s) : s(s) {}
36 };
37 }
38  
39 namespace xs {
40 template<> struct Typemap<RefOnly&> : TypemapBase<RefOnly&> {
41 1 ▶ static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; }
Branch: 7 branches
BranchTrueFalseTotal
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 1 0 1
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 1 0 1
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 1 0 1
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 1 0 1
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 1 0 1
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 1 0 1
static RefOnly& in (const Simple& arg) { static RefOnly r(""); r.s = arg.as_string() + "iR&"; return r; } 0 0 0
42 1 ▶ static Sv out (RefOnly& v, const Sv& = {}) { return Simple(v.s + "oR&"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (RefOnly& v, const Sv& = {}) { return Simple(v.s + "oR&"); } 1 0 1
static Sv out (RefOnly& v, const Sv& = {}) { return Simple(v.s + "oR&"); } 1 0 1
43 };
44  
45 template<> struct Typemap<ValOnly> : TypemapBase<ValOnly> {
46 2 ▶ static ValOnly in (const Simple& arg) { return ValOnly(arg.as_string() + "iV"); }
Branch: 3 branches
BranchTrueFalseTotal
static ValOnly in (const Simple& arg) { return ValOnly(arg.as_string() + "iV"); } 2 0 2
static ValOnly in (const Simple& arg) { return ValOnly(arg.as_string() + "iV"); } 2 0 2
static ValOnly in (const Simple& arg) { return ValOnly(arg.as_string() + "iV"); } 2 0 2
47 2 ▶ static Sv out (const ValOnly& v, const Sv& = {}) { return Simple(v.s + "oV"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (const ValOnly& v, const Sv& = {}) { return Simple(v.s + "oV"); } 2 0 2
static Sv out (const ValOnly& v, const Sv& = {}) { return Simple(v.s + "oV"); } 2 0 2
48 };
49  
50 template<> struct Typemap<RefAndVal> : TypemapBase<RefAndVal> {
51 1 ▶ static RefAndVal in (const Simple& arg) { return RefAndVal(arg.as_string() + "iRV"); }
Branch: 3 branches
BranchTrueFalseTotal
static RefAndVal in (const Simple& arg) { return RefAndVal(arg.as_string() + "iRV"); } 1 0 1
static RefAndVal in (const Simple& arg) { return RefAndVal(arg.as_string() + "iRV"); } 1 0 1
static RefAndVal in (const Simple& arg) { return RefAndVal(arg.as_string() + "iRV"); } 1 0 1
52 1 ▶ static Sv out (const RefAndVal& v, const Sv& = {}) { return Simple(v.s + "oRV"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (const RefAndVal& v, const Sv& = {}) { return Simple(v.s + "oRV"); } 1 0 1
static Sv out (const RefAndVal& v, const Sv& = {}) { return Simple(v.s + "oRV"); } 1 0 1
53 };
54 template<> struct Typemap<RefAndVal&> : TypemapBase<RefAndVal&> {
55 1 ▶ static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; }
Branch: 7 branches
BranchTrueFalseTotal
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 1 0 1
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 1 0 1
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 1 0 1
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 1 0 1
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 1 0 1
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 1 0 1
static RefAndVal& in (const Simple& arg) { static RefAndVal r(""); r.s = arg.as_string() + "iRV&"; return r; } 0 0 0
56 1 ▶ static Sv out (RefAndVal& v, const Sv& = {}) { return Simple(v.s + "oRV&"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (RefAndVal& v, const Sv& = {}) { return Simple(v.s + "oRV&"); } 1 0 1
static Sv out (RefAndVal& v, const Sv& = {}) { return Simple(v.s + "oRV&"); } 1 0 1
57 };
58  
59 template<> struct Typemap<PtrOnly*> : TypemapBase<PtrOnly*> {
60 2 ▶ static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; }
Branch: 7 branches
BranchTrueFalseTotal
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 1 1 2
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 1 0 1
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 1 0 1
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 2 0 2
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 2 0 2
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 2 0 2
static PtrOnly* in (const Simple& arg) { static PtrOnly r(""); r.s = arg.as_string() + "iP*"; return &r; } 0 0 0
61 2 ▶ static Sv out (PtrOnly* v, const Sv& = {}) { return Simple(v->s + "oP*"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (PtrOnly* v, const Sv& = {}) { return Simple(v->s + "oP*"); } 2 0 2
static Sv out (PtrOnly* v, const Sv& = {}) { return Simple(v->s + "oP*"); } 2 0 2
62 };
63  
64 template<> struct Typemap<PtrAndVal> : TypemapBase<PtrAndVal> {
65 1 ▶ static PtrAndVal in (const Simple& arg) { return PtrAndVal(arg.as_string() + "iPV"); }
Branch: 3 branches
BranchTrueFalseTotal
static PtrAndVal in (const Simple& arg) { return PtrAndVal(arg.as_string() + "iPV"); } 1 0 1
static PtrAndVal in (const Simple& arg) { return PtrAndVal(arg.as_string() + "iPV"); } 1 0 1
static PtrAndVal in (const Simple& arg) { return PtrAndVal(arg.as_string() + "iPV"); } 1 0 1
66 1 ▶ static Sv out (const PtrAndVal& v, const Sv& = {}) { return Simple(v.s + "oPV"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (const PtrAndVal& v, const Sv& = {}) { return Simple(v.s + "oPV"); } 1 0 1
static Sv out (const PtrAndVal& v, const Sv& = {}) { return Simple(v.s + "oPV"); } 1 0 1
67 };
68 template<> struct Typemap<PtrAndVal*> : TypemapBase<PtrAndVal*> {
69 2 ▶ static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; }
Branch: 7 branches
BranchTrueFalseTotal
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 1 1 2
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 1 0 1
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 1 0 1
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 2 0 2
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 2 0 2
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 2 0 2
static PtrAndVal* in (const Simple& arg) { static PtrAndVal r(""); r.s = arg.as_string() + "iPV*"; return &r; } 0 0 0
70 2 ▶ static Sv out (PtrAndVal* v, const Sv& = {}) { return Simple(v->s + "oPV*"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (PtrAndVal* v, const Sv& = {}) { return Simple(v->s + "oPV*"); } 2 0 2
static Sv out (PtrAndVal* v, const Sv& = {}) { return Simple(v->s + "oPV*"); } 2 0 2
71 };
72  
73 template<> struct Typemap<RefAndPtr&> : TypemapBase<RefAndPtr&> {
74 1 ▶ static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; }
Branch: 7 branches
BranchTrueFalseTotal
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 1 0 1
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 1 0 1
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 1 0 1
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 1 0 1
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 1 0 1
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 1 0 1
static RefAndPtr& in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP&"; return r; } 0 0 0
75 1 ▶ static Sv out (RefAndPtr& v, const Sv& = {}) { return Simple(v.s + "oRP&"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (RefAndPtr& v, const Sv& = {}) { return Simple(v.s + "oRP&"); } 1 0 1
static Sv out (RefAndPtr& v, const Sv& = {}) { return Simple(v.s + "oRP&"); } 1 0 1
76 };
77 template<> struct Typemap<RefAndPtr*> : TypemapBase<RefAndPtr*> {
78 1 ▶ static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; }
Branch: 7 branches
BranchTrueFalseTotal
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 1 0 1
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 1 0 1
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 1 0 1
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 1 0 1
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 1 0 1
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 1 0 1
static RefAndPtr* in (const Simple& arg) { static RefAndPtr r(""); r.s = arg.as_string() + "iRP*"; return &r; } 0 0 0
79 1 ▶ static Sv out (RefAndPtr* v, const Sv& = {}) { return Simple(v->s + "oRP*"); }
Branch: 2 branches
BranchTrueFalseTotal
static Sv out (RefAndPtr* v, const Sv& = {}) { return Simple(v->s + "oRP*"); } 1 0 1
static Sv out (RefAndPtr* v, const Sv& = {}) { return Simple(v->s + "oRP*"); } 1 0 1
80 };
81 }
82  
83 6 TEST_CASE("ref&", "[ref&]") {
84 6 ▶ SECTION("ref only") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("ref only") { 6 0 6
SECTION("ref only") { 6 0 6
SECTION("ref only") { 1 5 6
85 1 ▶ auto ret = out<RefOnly&>(in<RefOnly&>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
auto ret = out<RefOnly&>(in<RefOnly&>(Sv())); 1 0 1
auto ret = out<RefOnly&>(in<RefOnly&>(Sv())); 1 0 1
86 1 ▶ CHECK(Simple(ret) == "iR&oR&");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iR&oR&"); 1 0 1
CHECK(Simple(ret) == "iR&oR&"); 1 0 1
CHECK(Simple(ret) == "iR&oR&"); 1 0 1
CHECK(Simple(ret) == "iR&oR&"); 1 0 1
CHECK(Simple(ret) == "iR&oR&"); 1 0 1
CHECK(Simple(ret) == "iR&oR&"); 1 0 1
CHECK(Simple(ret) == "iR&oR&"); 0 0 0
CHECK(Simple(ret) == "iR&oR&"); 0 0 0
87 7 }
88 6 ▶ SECTION("val only") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("val only") { 6 0 6
SECTION("val only") { 6 0 6
SECTION("val only") { 1 5 6
89 1 ▶ auto ret = out<ValOnly>(in<ValOnly>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
auto ret = out<ValOnly>(in<ValOnly>(Sv())); 1 0 1
auto ret = out<ValOnly>(in<ValOnly>(Sv())); 1 0 1
90 1 ▶ CHECK(Simple(ret) == "iVoV");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 0 0 0
CHECK(Simple(ret) == "iVoV"); 0 0 0
91 1 ▶ ret = out<ValOnly&>(in<ValOnly&>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
ret = out<ValOnly&>(in<ValOnly&>(Sv())); 1 0 1
ret = out<ValOnly&>(in<ValOnly&>(Sv())); 1 0 1
92 1 ▶ CHECK(Simple(ret) == "iVoV");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 1 0 1
CHECK(Simple(ret) == "iVoV"); 0 0 0
CHECK(Simple(ret) == "iVoV"); 0 0 0
93 7 }
94 6 ▶ SECTION("ref and val") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("ref and val") { 6 0 6
SECTION("ref and val") { 6 0 6
SECTION("ref and val") { 1 5 6
95 1 ▶ auto ret = out<RefAndVal>(in<RefAndVal>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
auto ret = out<RefAndVal>(in<RefAndVal>(Sv())); 1 0 1
auto ret = out<RefAndVal>(in<RefAndVal>(Sv())); 1 0 1
96 1 ▶ CHECK(Simple(ret) == "iRVoRV");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iRVoRV"); 1 0 1
CHECK(Simple(ret) == "iRVoRV"); 1 0 1
CHECK(Simple(ret) == "iRVoRV"); 1 0 1
CHECK(Simple(ret) == "iRVoRV"); 1 0 1
CHECK(Simple(ret) == "iRVoRV"); 1 0 1
CHECK(Simple(ret) == "iRVoRV"); 1 0 1
CHECK(Simple(ret) == "iRVoRV"); 0 0 0
CHECK(Simple(ret) == "iRVoRV"); 0 0 0
97 1 ▶ ret = out<RefAndVal&>(in<RefAndVal&>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
ret = out<RefAndVal&>(in<RefAndVal&>(Sv())); 1 0 1
ret = out<RefAndVal&>(in<RefAndVal&>(Sv())); 1 0 1
98 1 ▶ CHECK(Simple(ret) == "iRV&oRV&");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iRV&oRV&"); 1 0 1
CHECK(Simple(ret) == "iRV&oRV&"); 1 0 1
CHECK(Simple(ret) == "iRV&oRV&"); 1 0 1
CHECK(Simple(ret) == "iRV&oRV&"); 1 0 1
CHECK(Simple(ret) == "iRV&oRV&"); 1 0 1
CHECK(Simple(ret) == "iRV&oRV&"); 1 0 1
CHECK(Simple(ret) == "iRV&oRV&"); 0 0 0
CHECK(Simple(ret) == "iRV&oRV&"); 0 0 0
99 7 }
100 6 ▶ SECTION("ptr only") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("ptr only") { 6 0 6
SECTION("ptr only") { 6 0 6
SECTION("ptr only") { 1 5 6
101 1 ▶ auto ret = out<PtrOnly*>(in<PtrOnly*>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
auto ret = out<PtrOnly*>(in<PtrOnly*>(Sv())); 1 0 1
auto ret = out<PtrOnly*>(in<PtrOnly*>(Sv())); 1 0 1
102 1 ▶ CHECK(Simple(ret) == "iP*oP*");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 0 0 0
CHECK(Simple(ret) == "iP*oP*"); 0 0 0
103 1 ▶ ret = out<PtrOnly*>(&in<PtrOnly&>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
ret = out<PtrOnly*>(&in<PtrOnly&>(Sv())); 1 0 1
ret = out<PtrOnly*>(&in<PtrOnly&>(Sv())); 1 0 1
104 1 ▶ CHECK(Simple(ret) == "iP*oP*");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 1 0 1
CHECK(Simple(ret) == "iP*oP*"); 0 0 0
CHECK(Simple(ret) == "iP*oP*"); 0 0 0
105 7 }
106 6 ▶ SECTION("ptr and val") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("ptr and val") { 6 0 6
SECTION("ptr and val") { 6 0 6
SECTION("ptr and val") { 1 5 6
107 1 ▶ auto ret = out<PtrAndVal>(in<PtrAndVal>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
auto ret = out<PtrAndVal>(in<PtrAndVal>(Sv())); 1 0 1
auto ret = out<PtrAndVal>(in<PtrAndVal>(Sv())); 1 0 1
108 1 ▶ CHECK(Simple(ret) == "iPVoPV");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iPVoPV"); 1 0 1
CHECK(Simple(ret) == "iPVoPV"); 1 0 1
CHECK(Simple(ret) == "iPVoPV"); 1 0 1
CHECK(Simple(ret) == "iPVoPV"); 1 0 1
CHECK(Simple(ret) == "iPVoPV"); 1 0 1
CHECK(Simple(ret) == "iPVoPV"); 1 0 1
CHECK(Simple(ret) == "iPVoPV"); 0 0 0
CHECK(Simple(ret) == "iPVoPV"); 0 0 0
109 1 ▶ ret = out<PtrAndVal*>(in<PtrAndVal*>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
ret = out<PtrAndVal*>(in<PtrAndVal*>(Sv())); 1 0 1
ret = out<PtrAndVal*>(in<PtrAndVal*>(Sv())); 1 0 1
110 1 ▶ CHECK(Simple(ret) == "iPV*oPV*");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 0 0 0
CHECK(Simple(ret) == "iPV*oPV*"); 0 0 0
111 1 ▶ ret = out<PtrAndVal*>(&in<PtrAndVal&>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
ret = out<PtrAndVal*>(&in<PtrAndVal&>(Sv())); 1 0 1
ret = out<PtrAndVal*>(&in<PtrAndVal&>(Sv())); 1 0 1
112 1 ▶ CHECK(Simple(ret) == "iPV*oPV*");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 1 0 1
CHECK(Simple(ret) == "iPV*oPV*"); 0 0 0
CHECK(Simple(ret) == "iPV*oPV*"); 0 0 0
113 7 }
114 6 ▶ SECTION("ref and ptr") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("ref and ptr") { 6 0 6
SECTION("ref and ptr") { 6 0 6
SECTION("ref and ptr") { 1 5 6
115 1 ▶ auto ret = out<RefAndPtr*>(in<RefAndPtr*>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
auto ret = out<RefAndPtr*>(in<RefAndPtr*>(Sv())); 1 0 1
auto ret = out<RefAndPtr*>(in<RefAndPtr*>(Sv())); 1 0 1
116 1 ▶ CHECK(Simple(ret) == "iRP*oRP*");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iRP*oRP*"); 1 0 1
CHECK(Simple(ret) == "iRP*oRP*"); 1 0 1
CHECK(Simple(ret) == "iRP*oRP*"); 1 0 1
CHECK(Simple(ret) == "iRP*oRP*"); 1 0 1
CHECK(Simple(ret) == "iRP*oRP*"); 1 0 1
CHECK(Simple(ret) == "iRP*oRP*"); 1 0 1
CHECK(Simple(ret) == "iRP*oRP*"); 0 0 0
CHECK(Simple(ret) == "iRP*oRP*"); 0 0 0
117 1 ▶ ret = out<RefAndPtr&>(in<RefAndPtr&>(Sv()));
Branch: 2 branches
BranchTrueFalseTotal
ret = out<RefAndPtr&>(in<RefAndPtr&>(Sv())); 1 0 1
ret = out<RefAndPtr&>(in<RefAndPtr&>(Sv())); 1 0 1
118 1 ▶ CHECK(Simple(ret) == "iRP&oRP&");
Branch: 8 branches
BranchTrueFalseTotal
CHECK(Simple(ret) == "iRP&oRP&"); 1 0 1
CHECK(Simple(ret) == "iRP&oRP&"); 1 0 1
CHECK(Simple(ret) == "iRP&oRP&"); 1 0 1
CHECK(Simple(ret) == "iRP&oRP&"); 1 0 1
CHECK(Simple(ret) == "iRP&oRP&"); 1 0 1
CHECK(Simple(ret) == "iRP&oRP&"); 1 0 1
CHECK(Simple(ret) == "iRP&oRP&"); 0 0 0
CHECK(Simple(ret) == "iRP&oRP&"); 0 0 0
119 7 }
120 6 }
« t/svapi/stash.cc ↑ Summary t/svapi/object.cc »