t/typemap/not_null.xsi

filter: Statementstmt 100% 7 / 7 Branchbran 42.8% 6 / 14 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 61.9% 13 / 21 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« src/xs/basic.cc ↑ Summary t/typemap/object/refcnt.xsi »
1 MODE: INLINE
2  
3 struct TestNN : panda::Refcnt {
4 int val;
5 TestNN (int val) : val(val) {}
6 };
7 using TestNNi = panda::iptr<TestNN>;
8  
9 namespace xs {
10 template <> struct Typemap<TestNN*> : TypemapObject<TestNN*, TestNN*, ObjectTypeRefcntPtr, ObjectStorageIV> {};
11 }
12  
13 MODULE = MyTest::Typemap PACKAGE = MyTest::NotNull
14 PROTOTYPES: DISABLE
15  
16 TestNN* TestNN::new (int arg) {
17 3 RETVAL = new TestNN(arg);
18 3 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 3 0 3
19 3 ▶ 
Branch: 4 branches
BranchTrueFalseTotal
3 0 3
3 0 3
3 0 3
0 0 0
20 int TestNN::val () {
21 2 ▶ RETVAL = THIS->val;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = THIS->val; 0 2 2
22 }
23  
24 void TestNN::set_from (xs::nn<TestNN*> other) {
25 1 THIS->val = (&*other)->val;
26 }
27  
28 void TestNN::set_from2 (xs::nn<TestNNi> other) {
29 1 THIS->val = other->val;
30 }
31  
32 3 ▶void TestNN::DESTROY() {
Branch: 1 branch
BranchTrueFalseTotal
void TestNN::DESTROY() { 3 0 3
33 }
« src/xs/basic.cc ↑ Summary t/typemap/object/refcnt.xsi »