t/typemap/expected.xsi

filter: Statementstmt 100% 12 / 12 Branchbran 61.1% 22 / 36 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 70.8% 34 / 48 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« Framework.xs ↑ Summary src/xs/Simple.cc »
1 MODE: INLINE
2 #include <xs/typemap/expected.h>
3  
4 MODULE = MyTest::Typemap PACKAGE = MyTest::Expected
5 PROTOTYPES: DISABLE
6  
7 TYPEMAP: << END
8 expected<void,std::error_code> T_xs_expected
9 expected<string,std::error_code> T_xs_expected
10 END
11  
12 void void_ok (...) {
13 4 expected<void,std::error_code> ret = {};
14 4 ▶ XSRETURN_EXPECTED(ret);
Branch: 1 branch
BranchTrueFalseTotal
XSRETURN_EXPECTED(ret); 4 0 4
15 }
16  
17 expected<void,std::error_code> void_err (...) {
18 4 ▶ RETVAL = make_unexpected(make_error_code(std::errc::timed_out));
Branch: 3 branches
BranchTrueFalseTotal
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 3 1 4
19 }
20  
21 void ret_ok (...) {
22 4 ▶ expected<string,std::error_code> ret = string("hi");
Branch: 1 branch
BranchTrueFalseTotal
expected<string,std::error_code> ret = string("hi"); 4 0 4
23 4 ▶ XSRETURN_EXPECTED(ret);
Branch: 1 branch
BranchTrueFalseTotal
XSRETURN_EXPECTED(ret); 4 0 4
24 }
25  
26 expected<string,std::error_code> ret_err (...) {
27 4 ▶ RETVAL = make_unexpected(make_error_code(std::errc::timed_out));
Branch: 3 branches
BranchTrueFalseTotal
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 1 3 4
28 }
29  
30  
31 MODULE = MyTest::Typemap PACKAGE = MyTest::Excepted
32 PROTOTYPES: DISABLE
33  
34 TYPEMAP: << END
35 excepted<void,std::error_code> T_xs_expected
36 excepted<string,std::error_code> T_xs_expected
37 END
38  
39 void void_ok (...) {
40 4 excepted<void,std::error_code> ret = {};
41 4 ▶ XSRETURN_EXPECTED(ret);
Branch: 1 branch
BranchTrueFalseTotal
XSRETURN_EXPECTED(ret); 4 0 4
42 }
43  
44 excepted<void,std::error_code> void_err (...) {
45 4 ▶ RETVAL = make_unexpected(make_error_code(std::errc::timed_out));
Branch: 3 branches
BranchTrueFalseTotal
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 3 1 4
46 }
47  
48 void ret_ok (...) {
49 4 ▶ excepted<string,std::error_code> ret = string("hi");
Branch: 1 branch
BranchTrueFalseTotal
excepted<string,std::error_code> ret = string("hi"); 4 0 4
50 4 ▶ XSRETURN_EXPECTED(ret);
Branch: 1 branch
BranchTrueFalseTotal
XSRETURN_EXPECTED(ret); 4 0 4
51 }
52  
53 excepted<string,std::error_code> ret_err (...) {
54 4 ▶ RETVAL = make_unexpected(make_error_code(std::errc::timed_out));
Branch: 3 branches
BranchTrueFalseTotal
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 4 0 4
RETVAL = make_unexpected(make_error_code(std::errc::timed_out)); 1 3 4
55 }
« Framework.xs ↑ Summary src/xs/Simple.cc »