Branch Coverage

t/svapi/sub.cc
Criterion Covered Total %
branch 964 2032 47.4


line true false branch
8 16 0 REQUIRE(a.size() == l.size());
16 0 REQUIRE(a.size() == l.size());
16 0 REQUIRE(a.size() == l.size());
16 0 REQUIRE(a.size() == l.size());
16 0 REQUIRE(a.size() == l.size());
16 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
10 32 16 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
32 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
32 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
32 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
32 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
32 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
32 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
15 1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
1 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
0 0 REQUIRE(a.size() == l.size());
17 4 1 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
4 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
4 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
4 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
4 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
4 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
2 1 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
2 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
2 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
2 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
2 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
2 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
3 1 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
3 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
3 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
3 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
3 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
3 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
0 0 for (size_t i = 0; i < l.size(); ++i) CHECK(a[i] == chk[i]);
21 103 0 perlvars vars;
22 103 0 Sub my(vars.cv);
25 103 0 SECTION("ctor") {
103 0 SECTION("ctor") {
103 0 SECTION("ctor") {
103 0 SECTION("ctor") {
34 69 SECTION("ctor") {
26 34 0 SECTION("empty") {
34 0 SECTION("empty") {
34 0 SECTION("empty") {
34 0 SECTION("empty") {
1 33 SECTION("empty") {
28 1 0 REQUIRE(!o);
1 0 REQUIRE(!o);
1 0 REQUIRE(!o);
1 0 REQUIRE(!o);
0 0 REQUIRE(!o);
0 0 REQUIRE(!o);
30 34 0 SECTION("SV") {
34 0 SECTION("SV") {
34 0 SECTION("SV") {
34 0 SECTION("SV") {
24 10 SECTION("SV") {
31 24 0 SECTION("undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
2 22 SECTION("undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
2 0 SECTION("undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
32 24 0 SECTION("number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
24 0 SECTION("number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
24 0 SECTION("number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
24 0 SECTION("number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
2 22 SECTION("number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
2 0 SECTION("number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
33 24 0 SECTION("string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
24 0 SECTION("string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
24 0 SECTION("string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
24 0 SECTION("string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
2 22 SECTION("string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
2 0 SECTION("string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
34 24 0 SECTION("RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
24 0 SECTION("RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
24 0 SECTION("RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
24 0 SECTION("RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
2 22 SECTION("RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
2 0 SECTION("RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
35 24 0 SECTION("RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
2 22 SECTION("RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
2 0 SECTION("RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
36 24 0 SECTION("RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); }
24 0 SECTION("RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); }
24 0 SECTION("RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); }
24 0 SECTION("RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); }
2 22 SECTION("RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); }
2 0 SECTION("RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); }
37 24 0 SECTION("RV-CV") { Test::ctor(vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
24 0 SECTION("RV-CV") { Test::ctor(vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
24 0 SECTION("RV-CV") { Test::ctor(vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
24 0 SECTION("RV-CV") { Test::ctor(vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
2 22 SECTION("RV-CV") { Test::ctor(vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
2 0 SECTION("RV-CV") { Test::ctor(vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
38 24 0 SECTION("AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
2 22 SECTION("AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
2 0 SECTION("AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
39 24 0 SECTION("HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); }
24 0 SECTION("HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); }
24 0 SECTION("HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); }
24 0 SECTION("HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); }
2 22 SECTION("HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); }
2 0 SECTION("HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); }
40 24 0 SECTION("CV") { Test::ctor((SV*)vars.cv, behaviour_t::VALID); }
24 0 SECTION("CV") { Test::ctor((SV*)vars.cv, behaviour_t::VALID); }
24 0 SECTION("CV") { Test::ctor((SV*)vars.cv, behaviour_t::VALID); }
24 0 SECTION("CV") { Test::ctor((SV*)vars.cv, behaviour_t::VALID); }
2 22 SECTION("CV") { Test::ctor((SV*)vars.cv, behaviour_t::VALID); }
2 0 SECTION("CV") { Test::ctor((SV*)vars.cv, behaviour_t::VALID); }
41 24 0 SECTION("GV") { Test::ctor((SV*)vars.gv, behaviour_t::THROWS); }
24 0 SECTION("GV") { Test::ctor((SV*)vars.gv, behaviour_t::THROWS); }
24 0 SECTION("GV") { Test::ctor((SV*)vars.gv, behaviour_t::THROWS); }
24 0 SECTION("GV") { Test::ctor((SV*)vars.gv, behaviour_t::THROWS); }
2 22 SECTION("GV") { Test::ctor((SV*)vars.gv, behaviour_t::THROWS); }
2 0 SECTION("GV") { Test::ctor((SV*)vars.gv, behaviour_t::THROWS); }
42 24 0 SECTION("IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
2 22 SECTION("IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
2 0 SECTION("IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
44 34 0 SECTION("CV") { Test::ctor(vars.cv, behaviour_t::VALID); }
34 0 SECTION("CV") { Test::ctor(vars.cv, behaviour_t::VALID); }
34 0 SECTION("CV") { Test::ctor(vars.cv, behaviour_t::VALID); }
34 0 SECTION("CV") { Test::ctor(vars.cv, behaviour_t::VALID); }
2 32 SECTION("CV") { Test::ctor(vars.cv, behaviour_t::VALID); }
2 0 SECTION("CV") { Test::ctor(vars.cv, behaviour_t::VALID); }
46 34 0 SECTION("Sub") { Test::ctor(my, behaviour_t::VALID); }
34 0 SECTION("Sub") { Test::ctor(my, behaviour_t::VALID); }
34 0 SECTION("Sub") { Test::ctor(my, behaviour_t::VALID); }
34 0 SECTION("Sub") { Test::ctor(my, behaviour_t::VALID); }
2 32 SECTION("Sub") { Test::ctor(my, behaviour_t::VALID); }
2 0 SECTION("Sub") { Test::ctor(my, behaviour_t::VALID); }
47 34 0 SECTION("valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
34 0 SECTION("valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
34 0 SECTION("valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
34 0 SECTION("valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
2 32 SECTION("valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
2 0 SECTION("valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
48 34 0 SECTION("invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 0 SECTION("invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 0 SECTION("invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 0 SECTION("invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
2 32 SECTION("invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
2 0 SECTION("invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
50 34 0 SECTION("from string") {
34 0 SECTION("from string") {
34 0 SECTION("from string") {
34 0 SECTION("from string") {
1 33 SECTION("from string") {
51 1 0 Sub c("M1::dummy2");
52 1 0 REQUIRE(c);
1 0 REQUIRE(c);
1 0 REQUIRE(c);
1 0 REQUIRE(c);
0 0 REQUIRE(c);
0 0 REQUIRE(c);
53 1 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
1 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
1 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
1 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
1 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
1 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
0 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
0 0 REQUIRE(c.get() == get_cv("M1::dummy2", 0));
54 1 0 Sub c2("M1::nonexistent");
55 1 0 REQUIRE(!c2);
1 0 REQUIRE(!c2);
1 0 REQUIRE(!c2);
1 0 REQUIRE(!c2);
0 0 REQUIRE(!c2);
0 0 REQUIRE(!c2);
56 1 0 Sub c3("M1::nonexistent", GV_ADD);
57 1 0 REQUIRE(c3);
1 0 REQUIRE(c3);
1 0 REQUIRE(c3);
1 0 REQUIRE(c3);
0 0 REQUIRE(c3);
0 0 REQUIRE(c3);
58 1 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
1 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
1 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
1 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
1 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
1 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
0 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
0 0 REQUIRE(c3.get() == get_cv("M1::nonexistent", 0));
62 103 0 SECTION("operator=") {
103 0 SECTION("operator=") {
103 0 SECTION("operator=") {
103 0 SECTION("operator=") {
38 65 SECTION("operator=") {
63 38 0 Sub o("M1::dummy2");
64 38 0 SECTION("SV") {
38 0 SECTION("SV") {
38 0 SECTION("SV") {
38 0 SECTION("SV") {
24 14 SECTION("SV") {
65 24 0 SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); }
2 22 SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); }
2 0 SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); }
66 24 0 SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); }
24 0 SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); }
24 0 SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); }
24 0 SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); }
2 22 SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); }
2 0 SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); }
67 24 0 SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); }
24 0 SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); }
24 0 SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); }
24 0 SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); }
2 22 SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); }
2 0 SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); }
68 24 0 SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); }
24 0 SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); }
24 0 SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); }
24 0 SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); }
2 22 SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); }
2 0 SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); }
69 24 0 SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::THROWS); }
2 22 SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::THROWS); }
2 0 SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::THROWS); }
70 24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); }
24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); }
24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); }
24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); }
2 22 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); }
2 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); }
71 24 0 SECTION("RV-CV") { Test::assign(o, vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
24 0 SECTION("RV-CV") { Test::assign(o, vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
24 0 SECTION("RV-CV") { Test::assign(o, vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
24 0 SECTION("RV-CV") { Test::assign(o, vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
2 22 SECTION("RV-CV") { Test::assign(o, vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
2 0 SECTION("RV-CV") { Test::assign(o, vars.cvr, behaviour_t::VALID, (SV*)vars.cv); }
72 24 0 SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::THROWS); }
2 22 SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::THROWS); }
2 0 SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::THROWS); }
73 24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); }
24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); }
24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); }
24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); }
2 22 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); }
2 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); }
74 24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::VALID); }
24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::VALID); }
24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::VALID); }
24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::VALID); }
2 22 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::VALID); }
2 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::VALID); }
75 24 0 SECTION("GV") { Test::assign(o, (SV*)vars.gv, behaviour_t::THROWS); }
24 0 SECTION("GV") { Test::assign(o, (SV*)vars.gv, behaviour_t::THROWS); }
24 0 SECTION("GV") { Test::assign(o, (SV*)vars.gv, behaviour_t::THROWS); }
24 0 SECTION("GV") { Test::assign(o, (SV*)vars.gv, behaviour_t::THROWS); }
2 22 SECTION("GV") { Test::assign(o, (SV*)vars.gv, behaviour_t::THROWS); }
2 0 SECTION("GV") { Test::assign(o, (SV*)vars.gv, behaviour_t::THROWS); }
76 24 0 SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); }
2 22 SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); }
2 0 SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); }
78 38 0 SECTION("CV") { Test::assign(o, vars.cv, behaviour_t::VALID); }
38 0 SECTION("CV") { Test::assign(o, vars.cv, behaviour_t::VALID); }
38 0 SECTION("CV") { Test::assign(o, vars.cv, behaviour_t::VALID); }
38 0 SECTION("CV") { Test::assign(o, vars.cv, behaviour_t::VALID); }
2 36 SECTION("CV") { Test::assign(o, vars.cv, behaviour_t::VALID); }
2 0 SECTION("CV") { Test::assign(o, vars.cv, behaviour_t::VALID); }
79 38 0 SECTION("Sub") { Test::assign(o, my, behaviour_t::VALID); }
38 0 SECTION("Sub") { Test::assign(o, my, behaviour_t::VALID); }
38 0 SECTION("Sub") { Test::assign(o, my, behaviour_t::VALID); }
38 0 SECTION("Sub") { Test::assign(o, my, behaviour_t::VALID); }
4 34 SECTION("Sub") { Test::assign(o, my, behaviour_t::VALID); }
4 0 SECTION("Sub") { Test::assign(o, my, behaviour_t::VALID); }
80 38 0 SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); }
38 0 SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); }
38 0 SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); }
38 0 SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); }
4 34 SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); }
4 0 SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); }
81 38 0 SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); }
38 0 SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); }
38 0 SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); }
38 0 SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); }
4 34 SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); }
4 0 SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); }
84 103 0 SECTION("set") {
103 0 SECTION("set") {
103 0 SECTION("set") {
103 0 SECTION("set") {
1 102 SECTION("set") {
86 1 0 o.set(vars.iv); // no checks
87 1 0 REQUIRE(o);
1 0 REQUIRE(o);
1 0 REQUIRE(o);
1 0 REQUIRE(o);
0 0 REQUIRE(o);
0 0 REQUIRE(o);
88 1 0 REQUIRE(SvREFCNT(vars.iv) == 2);
1 0 REQUIRE(SvREFCNT(vars.iv) == 2);
1 0 REQUIRE(SvREFCNT(vars.iv) == 2);
1 0 REQUIRE(SvREFCNT(vars.iv) == 2);
1 0 REQUIRE(SvREFCNT(vars.iv) == 2);
0 0 REQUIRE(SvREFCNT(vars.iv) == 2);
0 0 REQUIRE(SvREFCNT(vars.iv) == 2);
89 1 0 REQUIRE(o.get() == vars.iv);
1 0 REQUIRE(o.get() == vars.iv);
1 0 REQUIRE(o.get() == vars.iv);
1 0 REQUIRE(o.get() == vars.iv);
1 0 REQUIRE(o.get() == vars.iv);
0 0 REQUIRE(o.get() == vars.iv);
0 0 REQUIRE(o.get() == vars.iv);
92 103 0 SECTION("cast") {
103 0 SECTION("cast") {
103 0 SECTION("cast") {
103 0 SECTION("cast") {
2 101 SECTION("cast") {
93 2 0 Sub o(vars.cv);
95 2 0 SECTION("to SV") {
2 0 SECTION("to SV") {
2 0 SECTION("to SV") {
2 0 SECTION("to SV") {
1 1 SECTION("to SV") {
97 1 0 REQUIRE(sv == (SV*)vars.cv);
1 0 REQUIRE(sv == (SV*)vars.cv);
1 0 REQUIRE(sv == (SV*)vars.cv);
1 0 REQUIRE(sv == (SV*)vars.cv);
1 0 REQUIRE(sv == (SV*)vars.cv);
0 0 REQUIRE(sv == (SV*)vars.cv);
0 0 REQUIRE(sv == (SV*)vars.cv);
98 1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
100 2 0 SECTION("to CV") {
2 0 SECTION("to CV") {
2 0 SECTION("to CV") {
2 0 SECTION("to CV") {
1 1 SECTION("to CV") {
102 1 0 REQUIRE(sv == vars.cv);
1 0 REQUIRE(sv == vars.cv);
1 0 REQUIRE(sv == vars.cv);
1 0 REQUIRE(sv == vars.cv);
1 0 REQUIRE(sv == vars.cv);
0 0 REQUIRE(sv == vars.cv);
0 0 REQUIRE(sv == vars.cv);
103 1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
107 103 0 SECTION("get") {
103 0 SECTION("get") {
103 0 SECTION("get") {
103 0 SECTION("get") {
1 102 SECTION("get") {
108 1 0 Sub o(vars.cv);
110 1 0 REQUIRE(o.get<>() == (SV*)vars.cv);
1 0 REQUIRE(o.get<>() == (SV*)vars.cv);
1 0 REQUIRE(o.get<>() == (SV*)vars.cv);
1 0 REQUIRE(o.get<>() == (SV*)vars.cv);
1 0 REQUIRE(o.get<>() == (SV*)vars.cv);
0 0 REQUIRE(o.get<>() == (SV*)vars.cv);
0 0 REQUIRE(o.get<>() == (SV*)vars.cv);
111 1 0 REQUIRE(o.get() == (SV*)vars.cv);
1 0 REQUIRE(o.get() == (SV*)vars.cv);
1 0 REQUIRE(o.get() == (SV*)vars.cv);
1 0 REQUIRE(o.get() == (SV*)vars.cv);
1 0 REQUIRE(o.get() == (SV*)vars.cv);
0 0 REQUIRE(o.get() == (SV*)vars.cv);
0 0 REQUIRE(o.get() == (SV*)vars.cv);
112 1 0 REQUIRE(o.get() == vars.cv);
1 0 REQUIRE(o.get() == vars.cv);
1 0 REQUIRE(o.get() == vars.cv);
1 0 REQUIRE(o.get() == vars.cv);
1 0 REQUIRE(o.get() == vars.cv);
0 0 REQUIRE(o.get() == vars.cv);
0 0 REQUIRE(o.get() == vars.cv);
113 1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.cv) == rcnt);
116 103 0 SECTION("stash") {
103 0 SECTION("stash") {
103 0 SECTION("stash") {
103 0 SECTION("stash") {
1 102 SECTION("stash") {
117 1 0 Sub o("M1::dummy");
118 1 0 REQUIRE(o.stash());
1 0 REQUIRE(o.stash());
1 0 REQUIRE(o.stash());
1 0 REQUIRE(o.stash());
1 0 REQUIRE(o.stash());
0 0 REQUIRE(o.stash());
0 0 REQUIRE(o.stash());
119 1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
1 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
0 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
0 0 REQUIRE(o.stash() == gv_stashpvs("M1", 0));
122 103 0 SECTION("glob") {
103 0 SECTION("glob") {
103 0 SECTION("glob") {
103 0 SECTION("glob") {
1 102 SECTION("glob") {
123 1 0 Sub o("M1::dummy");
124 1 0 REQUIRE(o.glob());
1 0 REQUIRE(o.glob());
1 0 REQUIRE(o.glob());
1 0 REQUIRE(o.glob());
1 0 REQUIRE(o.glob());
0 0 REQUIRE(o.glob());
0 0 REQUIRE(o.glob());
125 1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
1 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
0 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
0 0 REQUIRE(o.glob() == Stash("M1")["dummy"]);
128 103 0 SECTION("name") {
103 0 SECTION("name") {
103 0 SECTION("name") {
103 0 SECTION("name") {
1 102 SECTION("name") {
129 1 0 Sub o("M1::dummy");
130 1 0 REQUIRE(o.name() == "dummy");
1 0 REQUIRE(o.name() == "dummy");
1 0 REQUIRE(o.name() == "dummy");
1 0 REQUIRE(o.name() == "dummy");
1 0 REQUIRE(o.name() == "dummy");
1 0 REQUIRE(o.name() == "dummy");
0 0 REQUIRE(o.name() == "dummy");
0 0 REQUIRE(o.name() == "dummy");
133 103 0 SECTION("named") {
103 0 SECTION("named") {
103 0 SECTION("named") {
103 0 SECTION("named") {
1 102 SECTION("named") {
134 1 0 Sub o("M1::dummy");
135 1 0 REQUIRE(!o.named());
1 0 REQUIRE(!o.named());
1 0 REQUIRE(!o.named());
1 0 REQUIRE(!o.named());
0 0 REQUIRE(!o.named());
0 0 REQUIRE(!o.named());
138 103 0 SECTION("call") {
103 0 SECTION("call") {
103 0 SECTION("call") {
103 0 SECTION("call") {
22 81 SECTION("call") {
139 22 0 Stash s("M1");
140 22 0 Simple call_cnt = s.scalar("call_cnt");
22 0 Simple call_cnt = s.scalar("call_cnt");
141 22 0 Simple call_ret = s.scalar("call_ret");
22 0 Simple call_ret = s.scalar("call_ret");
142 22 0 call_cnt = 0;
144 22 0 SECTION("args") {
22 0 SECTION("args") {
22 0 SECTION("args") {
22 0 SECTION("args") {
13 9 SECTION("args") {
145 13 0 auto sub = s.sub("check_args");
146 13 0 SECTION("empty") {
13 0 SECTION("empty") {
13 0 SECTION("empty") {
13 0 SECTION("empty") {
1 12 SECTION("empty") {
147 1 0 cmp_array(sub.call(), {});
1 0 cmp_array(sub.call(), {});
1 0 cmp_array(sub.call(), {});
148 1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
0 0 CHECK(call_cnt == 1);
0 0 CHECK(call_cnt == 1);
149 1 0 cmp_array(sub(), {});
1 0 cmp_array(sub(), {});
1 0 cmp_array(sub(), {});
150 1 0 CHECK(call_cnt == 2);
1 0 CHECK(call_cnt == 2);
1 0 CHECK(call_cnt == 2);
1 0 CHECK(call_cnt == 2);
1 0 CHECK(call_cnt == 2);
0 0 CHECK(call_cnt == 2);
0 0 CHECK(call_cnt == 2);
152 13 0 SECTION("SV*") {
13 0 SECTION("SV*") {
13 0 SECTION("SV*") {
13 0 SECTION("SV*") {
1 12 SECTION("SV*") {
153 1 0 cmp_array(sub.call(Simple(999).get()), {999});
1 0 cmp_array(sub.call(Simple(999).get()), {999});
1 0 cmp_array(sub.call(Simple(999).get()), {999});
1 0 cmp_array(sub.call(Simple(999).get()), {999});
155 13 0 SECTION("SV**") {
13 0 SECTION("SV**") {
13 0 SECTION("SV**") {
13 0 SECTION("SV**") {
1 12 SECTION("SV**") {
156 1 0 Simple arg1(100), arg2(200);
1 0 Simple arg1(100), arg2(200);
158 1 0 cmp_array(sub.call(args, 2), {100, 200});
1 0 cmp_array(sub.call(args, 2), {100, 200});
1 0 cmp_array(sub.call(args, 2), {100, 200});
160 13 0 SECTION("SV* + SV**") {
13 0 SECTION("SV* + SV**") {
13 0 SECTION("SV* + SV**") {
13 0 SECTION("SV* + SV**") {
1 12 SECTION("SV* + SV**") {
161 1 0 Simple arg1(100), arg2(200), arg3(300);
1 0 Simple arg1(100), arg2(200), arg3(300);
1 0 Simple arg1(100), arg2(200), arg3(300);
163 1 0 cmp_array(sub.call(Simple(100).get(), args, 2), {100, 200, 300});
1 0 cmp_array(sub.call(Simple(100).get(), args, 2), {100, 200, 300});
1 0 cmp_array(sub.call(Simple(100).get(), args, 2), {100, 200, 300});
1 0 cmp_array(sub.call(Simple(100).get(), args, 2), {100, 200, 300});
165 13 0 SECTION("const Scalar*") {
13 0 SECTION("const Scalar*") {
13 0 SECTION("const Scalar*") {
13 0 SECTION("const Scalar*") {
1 12 SECTION("const Scalar*") {
0 0 SECTION("const Scalar*") {
166 1 0 Scalar args[] = {Simple(111), Simple(222)};
1 0 Scalar args[] = {Simple(111), Simple(222)};
2 1 Scalar args[] = {Simple(111), Simple(222)};
0 0 Scalar args[] = {Simple(111), Simple(222)};
0 0 Scalar args[] = {Simple(111), Simple(222)};
167 1 0 cmp_array(sub.call(args, 2), {111, 222});
1 0 cmp_array(sub.call(args, 2), {111, 222});
1 0 cmp_array(sub.call(args, 2), {111, 222});
169 13 0 SECTION("SV* + const Scalar*") {
13 0 SECTION("SV* + const Scalar*") {
13 0 SECTION("SV* + const Scalar*") {
13 0 SECTION("SV* + const Scalar*") {
1 12 SECTION("SV* + const Scalar*") {
0 0 SECTION("SV* + const Scalar*") {
170 1 0 Scalar args[] = {Simple(111), Simple(222)};
1 0 Scalar args[] = {Simple(111), Simple(222)};
2 1 Scalar args[] = {Simple(111), Simple(222)};
0 0 Scalar args[] = {Simple(111), Simple(222)};
0 0 Scalar args[] = {Simple(111), Simple(222)};
171 1 0 cmp_array(sub.call(Simple(666).get(), args, 2), {666, 111, 222});
1 0 cmp_array(sub.call(Simple(666).get(), args, 2), {666, 111, 222});
1 0 cmp_array(sub.call(Simple(666).get(), args, 2), {666, 111, 222});
1 0 cmp_array(sub.call(Simple(666).get(), args, 2), {666, 111, 222});
173 13 0 SECTION("ilist") {
13 0 SECTION("ilist") {
13 0 SECTION("ilist") {
13 0 SECTION("ilist") {
1 12 SECTION("ilist") {
0 0 SECTION("ilist") {
174 1 0 std::initializer_list l = {Simple(123), Simple(321)};
1 0 std::initializer_list l = {Simple(123), Simple(321)};
2 1 std::initializer_list l = {Simple(123), Simple(321)};
0 0 std::initializer_list l = {Simple(123), Simple(321)};
0 0 std::initializer_list l = {Simple(123), Simple(321)};
175 1 0 cmp_array(sub.call(l), {123, 321});
1 0 cmp_array(sub.call(l), {123, 321});
1 0 cmp_array(sub.call(l), {123, 321});
177 13 0 SECTION("SV* + ilist") {
13 0 SECTION("SV* + ilist") {
13 0 SECTION("SV* + ilist") {
13 0 SECTION("SV* + ilist") {
1 12 SECTION("SV* + ilist") {
0 0 SECTION("SV* + ilist") {
178 1 0 std::initializer_list l = {Simple(300), Simple(400)};
1 0 std::initializer_list l = {Simple(300), Simple(400)};
2 1 std::initializer_list l = {Simple(300), Simple(400)};
0 0 std::initializer_list l = {Simple(300), Simple(400)};
0 0 std::initializer_list l = {Simple(300), Simple(400)};
179 1 0 cmp_array(sub.call(Simple(7).get(), l), {7, 300, 400});
1 0 cmp_array(sub.call(Simple(7).get(), l), {7, 300, 400});
1 0 cmp_array(sub.call(Simple(7).get(), l), {7, 300, 400});
1 0 cmp_array(sub.call(Simple(7).get(), l), {7, 300, 400});
181 13 0 SECTION("variadic-1") {
13 0 SECTION("variadic-1") {
13 0 SECTION("variadic-1") {
13 0 SECTION("variadic-1") {
1 12 SECTION("variadic-1") {
182 1 0 Simple arg(10);
183 1 0 cmp_array(sub.call(arg), {10});
1 0 cmp_array(sub.call(arg), {10});
1 0 cmp_array(sub.call(arg), {10});
184 1 0 CHECK(arg.use_count() == 1); // check for argument leaks
1 0 CHECK(arg.use_count() == 1); // check for argument leaks
1 0 CHECK(arg.use_count() == 1); // check for argument leaks
1 0 CHECK(arg.use_count() == 1); // check for argument leaks
1 0 CHECK(arg.use_count() == 1); // check for argument leaks
0 0 CHECK(arg.use_count() == 1); // check for argument leaks
0 0 CHECK(arg.use_count() == 1); // check for argument leaks
186 13 0 SECTION("variadic-2") {
13 0 SECTION("variadic-2") {
13 0 SECTION("variadic-2") {
13 0 SECTION("variadic-2") {
1 12 SECTION("variadic-2") {
187 1 0 cmp_array(sub.call(Simple(10), Simple(20)), {10, 20});
1 0 cmp_array(sub.call(Simple(10), Simple(20)), {10, 20});
1 0 cmp_array(sub.call(Simple(10), Simple(20)), {10, 20});
1 0 cmp_array(sub.call(Simple(10), Simple(20)), {10, 20});
1 0 cmp_array(sub.call(Simple(10), Simple(20)), {10, 20});
189 13 0 SECTION("variadic-3") {
13 0 SECTION("variadic-3") {
13 0 SECTION("variadic-3") {
13 0 SECTION("variadic-3") {
1 12 SECTION("variadic-3") {
190 1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100))), {10, 20, 100});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100))), {10, 20, 100});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100))), {10, 20, 100});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100))), {10, 20, 100});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100))), {10, 20, 100});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100))), {10, 20, 100});
192 13 0 SECTION("variadic-4") {
13 0 SECTION("variadic-4") {
13 0 SECTION("variadic-4") {
13 0 SECTION("variadic-4") {
1 12 SECTION("variadic-4") {
193 1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Scalar(Simple(100)), Sv(Simple(200))), {10, 20, 100, 200});
195 13 0 SECTION("empty/nullptr -> undef") {
13 0 SECTION("empty/nullptr -> undef") {
13 0 SECTION("empty/nullptr -> undef") {
13 0 SECTION("empty/nullptr -> undef") {
1 12 SECTION("empty/nullptr -> undef") {
196 1 0 Array ret = sub.call(Simple(10), nullptr, Simple());
1 0 Array ret = sub.call(Simple(10), nullptr, Simple());
1 0 Array ret = sub.call(Simple(10), nullptr, Simple());
197 1 0 CHECK(ret.use_count() == 1); // check for retval leaks
1 0 CHECK(ret.use_count() == 1); // check for retval leaks
1 0 CHECK(ret.use_count() == 1); // check for retval leaks
1 0 CHECK(ret.use_count() == 1); // check for retval leaks
1 0 CHECK(ret.use_count() == 1); // check for retval leaks
0 0 CHECK(ret.use_count() == 1); // check for retval leaks
0 0 CHECK(ret.use_count() == 1); // check for retval leaks
198 1 0 REQUIRE(ret.size() == 3);
1 0 REQUIRE(ret.size() == 3);
1 0 REQUIRE(ret.size() == 3);
1 0 REQUIRE(ret.size() == 3);
1 0 REQUIRE(ret.size() == 3);
1 0 REQUIRE(ret.size() == 3);
0 0 REQUIRE(ret.size() == 3);
0 0 REQUIRE(ret.size() == 3);
199 1 0 CHECK(ret[0] == 10);
1 0 CHECK(ret[0] == 10);
1 0 CHECK(ret[0] == 10);
1 0 CHECK(ret[0] == 10);
1 0 CHECK(ret[0] == 10);
1 0 CHECK(ret[0] == 10);
0 0 CHECK(ret[0] == 10);
0 0 CHECK(ret[0] == 10);
200 1 0 CHECK(!ret[1].defined());
1 0 CHECK(!ret[1].defined());
1 0 CHECK(!ret[1].defined());
1 0 CHECK(!ret[1].defined());
1 0 CHECK(!ret[1].defined());
0 0 CHECK(!ret[1].defined());
0 0 CHECK(!ret[1].defined());
201 1 0 CHECK(!ret[2].defined());
1 0 CHECK(!ret[2].defined());
1 0 CHECK(!ret[2].defined());
1 0 CHECK(!ret[2].defined());
1 0 CHECK(!ret[2].defined());
0 0 CHECK(!ret[2].defined());
0 0 CHECK(!ret[2].defined());
205 22 0 SECTION("context") {
22 0 SECTION("context") {
22 0 SECTION("context") {
22 0 SECTION("context") {
8 14 SECTION("context") {
206 8 0 auto sub = s.sub("check_context");
207 8 0 SECTION("void") {
8 0 SECTION("void") {
8 0 SECTION("void") {
8 0 SECTION("void") {
1 7 SECTION("void") {
209 1 0 sub.call(Simple(333));
1 0 sub.call(Simple(333));
210 1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
1 0 CHECK(call_cnt == 1);
0 0 CHECK(call_cnt == 1);
0 0 CHECK(call_cnt == 1);
211 1 0 CHECK(call_ret == 333);
1 0 CHECK(call_ret == 333);
1 0 CHECK(call_ret == 333);
1 0 CHECK(call_ret == 333);
1 0 CHECK(call_ret == 333);
0 0 CHECK(call_ret == 333);
0 0 CHECK(call_ret == 333);
213 8 0 SECTION("scalar") {
8 0 SECTION("scalar") {
8 0 SECTION("scalar") {
8 0 SECTION("scalar") {
1 7 SECTION("scalar") {
217 1 0 CHECK(sub.call(Simple(999)) == 999);
1 0 CHECK(sub.call(Simple(999)) == 999);
1 0 CHECK(sub.call(Simple(999)) == 999);
1 0 CHECK(sub.call(Simple(999)) == 999);
1 0 CHECK(sub.call(Simple(999)) == 999);
1 0 CHECK(sub.call(Simple(999)) == 999);
1 0 CHECK(sub.call(Simple(999)) == 999);
0 0 CHECK(sub.call(Simple(999)) == 999);
0 0 CHECK(sub.call(Simple(999)) == 999);
218 1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
1 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
0 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
0 0 CHECK(sub.call(Simple(999), Simple(111)) == 999);
219 1 0 CHECK(!sub.call().defined());
1 0 CHECK(!sub.call().defined());
1 0 CHECK(!sub.call().defined());
1 0 CHECK(!sub.call().defined());
1 0 CHECK(!sub.call().defined());
0 0 CHECK(!sub.call().defined());
0 0 CHECK(!sub.call().defined());
221 8 0 SECTION("fixed-list array") {
8 0 SECTION("fixed-list array") {
8 0 SECTION("fixed-list array") {
8 0 SECTION("fixed-list array") {
1 7 SECTION("fixed-list array") {
223 1 0 cmp_array(sub.call>(Simple(1), Simple(2), Simple(3)), {1,2,3});
1 0 cmp_array(sub.call>(Simple(1), Simple(2), Simple(3)), {1,2,3});
1 0 cmp_array(sub.call>(Simple(1), Simple(2), Simple(3)), {1,2,3});
1 0 cmp_array(sub.call>(Simple(1), Simple(2), Simple(3)), {1,2,3});
1 0 cmp_array(sub.call>(Simple(1), Simple(2), Simple(3)), {1,2,3});
224 1 0 cmp_array(sub.call>(Simple(4), Simple(5), Simple(6)), {4,5});
1 0 cmp_array(sub.call>(Simple(4), Simple(5), Simple(6)), {4,5});
1 0 cmp_array(sub.call>(Simple(4), Simple(5), Simple(6)), {4,5});
1 0 cmp_array(sub.call>(Simple(4), Simple(5), Simple(6)), {4,5});
1 0 cmp_array(sub.call>(Simple(4), Simple(5), Simple(6)), {4,5});
225 1 0 cmp_array(sub.call>(Simple(7), Simple(8), Simple(9)), {7,8,9,0});
1 0 cmp_array(sub.call>(Simple(7), Simple(8), Simple(9)), {7,8,9,0});
1 0 cmp_array(sub.call>(Simple(7), Simple(8), Simple(9)), {7,8,9,0});
1 0 cmp_array(sub.call>(Simple(7), Simple(8), Simple(9)), {7,8,9,0});
1 0 cmp_array(sub.call>(Simple(7), Simple(8), Simple(9)), {7,8,9,0});
227 8 0 SECTION("fixed-list tuple") {
8 0 SECTION("fixed-list tuple") {
8 0 SECTION("fixed-list tuple") {
8 0 SECTION("fixed-list tuple") {
2 6 SECTION("fixed-list tuple") {
231 2 0 SECTION("explicit") {
2 0 SECTION("explicit") {
2 0 SECTION("explicit") {
2 0 SECTION("explicit") {
1 1 SECTION("explicit") {
232 1 0 Tuple res = sub.call(Simple(10), Simple(20), Simple(30));
1 0 Tuple res = sub.call(Simple(10), Simple(20), Simple(30));
1 0 Tuple res = sub.call(Simple(10), Simple(20), Simple(30));
1 0 Tuple res = sub.call(Simple(10), Simple(20), Simple(30));
233 1 0 CHECK(Simple(std::get<0>(res)) == 10);
1 0 CHECK(Simple(std::get<0>(res)) == 10);
1 0 CHECK(Simple(std::get<0>(res)) == 10);
1 0 CHECK(Simple(std::get<0>(res)) == 10);
1 0 CHECK(Simple(std::get<0>(res)) == 10);
1 0 CHECK(Simple(std::get<0>(res)) == 10);
0 0 CHECK(Simple(std::get<0>(res)) == 10);
0 0 CHECK(Simple(std::get<0>(res)) == 10);
234 1 0 CHECK(std::get<1>(res) == 20);
1 0 CHECK(std::get<1>(res) == 20);
1 0 CHECK(std::get<1>(res) == 20);
1 0 CHECK(std::get<1>(res) == 20);
1 0 CHECK(std::get<1>(res) == 20);
0 0 CHECK(std::get<1>(res) == 20);
0 0 CHECK(std::get<1>(res) == 20);
235 1 0 CHECK(std::get<2>(res) == 30);
1 0 CHECK(std::get<2>(res) == 30);
1 0 CHECK(std::get<2>(res) == 30);
1 0 CHECK(std::get<2>(res) == 30);
1 0 CHECK(std::get<2>(res) == 30);
0 0 CHECK(std::get<2>(res) == 30);
0 0 CHECK(std::get<2>(res) == 30);
236 1 0 CHECK(!std::get<3>(res));
1 0 CHECK(!std::get<3>(res));
1 0 CHECK(!std::get<3>(res));
1 0 CHECK(!std::get<3>(res));
0 0 CHECK(!std::get<3>(res));
0 0 CHECK(!std::get<3>(res));
238 2 0 SECTION("implicit") {
2 0 SECTION("implicit") {
2 0 SECTION("implicit") {
2 0 SECTION("implicit") {
1 1 SECTION("implicit") {
239 1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
1 0 Tuple res = sub.call(Simple(50), Simple(60), Simple(70), Ref::create(Simple(111)), Simple(999));
240 1 0 CHECK(Simple(std::get<0>(res)) == 50);
1 0 CHECK(Simple(std::get<0>(res)) == 50);
1 0 CHECK(Simple(std::get<0>(res)) == 50);
1 0 CHECK(Simple(std::get<0>(res)) == 50);
1 0 CHECK(Simple(std::get<0>(res)) == 50);
1 0 CHECK(Simple(std::get<0>(res)) == 50);
0 0 CHECK(Simple(std::get<0>(res)) == 50);
0 0 CHECK(Simple(std::get<0>(res)) == 50);
241 1 0 CHECK(std::get<1>(res) == 60);
1 0 CHECK(std::get<1>(res) == 60);
1 0 CHECK(std::get<1>(res) == 60);
1 0 CHECK(std::get<1>(res) == 60);
1 0 CHECK(std::get<1>(res) == 60);
0 0 CHECK(std::get<1>(res) == 60);
0 0 CHECK(std::get<1>(res) == 60);
242 1 0 CHECK(std::get<2>(res) == 70);
1 0 CHECK(std::get<2>(res) == 70);
1 0 CHECK(std::get<2>(res) == 70);
1 0 CHECK(std::get<2>(res) == 70);
1 0 CHECK(std::get<2>(res) == 70);
0 0 CHECK(std::get<2>(res) == 70);
0 0 CHECK(std::get<2>(res) == 70);
243 1 0 auto ref = std::get<3>(res);
244 1 0 CHECK(ref);
1 0 CHECK(ref);
1 0 CHECK(ref);
1 0 CHECK(ref);
0 0 CHECK(ref);
0 0 CHECK(ref);
245 1 0 CHECK(ref.value() == 111);
1 0 CHECK(ref.value() == 111);
1 0 CHECK(ref.value() == 111);
1 0 CHECK(ref.value() == 111);
1 0 CHECK(ref.value() == 111);
1 0 CHECK(ref.value() == 111);
0 0 CHECK(ref.value() == 111);
0 0 CHECK(ref.value() == 111);
248 8 0 SECTION("unlimited-list") {
8 0 SECTION("unlimited-list") {
8 0 SECTION("unlimited-list") {
8 0 SECTION("unlimited-list") {
1 7 SECTION("unlimited-list") {
250 1 0 cmp_array(sub.call(Simple(10), Simple(20), Simple(30)), {10, 20, 30});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Simple(30)), {10, 20, 30});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Simple(30)), {10, 20, 30});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Simple(30)), {10, 20, 30});
1 0 cmp_array(sub.call(Simple(10), Simple(20), Simple(30)), {10, 20, 30});
252 8 0 SECTION("panda::string") {
8 0 SECTION("panda::string") {
8 0 SECTION("panda::string") {
8 0 SECTION("panda::string") {
1 7 SECTION("panda::string") {
254 1 0 auto str = sub.call(Simple("suka"));
1 0 auto str = sub.call(Simple("suka"));
255 1 0 CHECK(str == "suka");
1 0 CHECK(str == "suka");
1 0 CHECK(str == "suka");
1 0 CHECK(str == "suka");
1 0 CHECK(str == "suka");
0 0 CHECK(str == "suka");
0 0 CHECK(str == "suka");
257 8 0 SECTION("numeric") {
8 0 SECTION("numeric") {
8 0 SECTION("numeric") {
8 0 SECTION("numeric") {
1 7 SECTION("numeric") {
260 1 0 CHECK(sub.call(Simple(200)) == 200);
1 0 CHECK(sub.call(Simple(200)) == 200);
1 0 CHECK(sub.call(Simple(200)) == 200);
1 0 CHECK(sub.call(Simple(200)) == 200);
1 0 CHECK(sub.call(Simple(200)) == 200);
1 0 CHECK(sub.call(Simple(200)) == 200);
1 0 CHECK(sub.call(Simple(200)) == 200);
0 0 CHECK(sub.call(Simple(200)) == 200);
0 0 CHECK(sub.call(Simple(200)) == 200);
261 1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
1 0 CHECK(sub.call(Simple(1.234)) == 1.234);
0 0 CHECK(sub.call(Simple(1.234)) == 1.234);
0 0 CHECK(sub.call(Simple(1.234)) == 1.234);
262 1 0 CHECK(sub.call(Simple(1.234)) == 1);
1 0 CHECK(sub.call(Simple(1.234)) == 1);
1 0 CHECK(sub.call(Simple(1.234)) == 1);
1 0 CHECK(sub.call(Simple(1.234)) == 1);
1 0 CHECK(sub.call(Simple(1.234)) == 1);
1 0 CHECK(sub.call(Simple(1.234)) == 1);
1 0 CHECK(sub.call(Simple(1.234)) == 1);
0 0 CHECK(sub.call(Simple(1.234)) == 1);
0 0 CHECK(sub.call(Simple(1.234)) == 1);
266 22 0 SECTION("call result as argument") {
22 0 SECTION("call result as argument") {
22 0 SECTION("call result as argument") {
22 0 SECTION("call result as argument") {
1 21 SECTION("call result as argument") {
267 1 0 auto sub = s.sub("check_args");
268 1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
1 0 Array ret = sub.call( sub.call(Simple(999)), sub.call(Simple(888), Simple(777)) );
269 1 0 cmp_array(ret[0], {999});
1 0 cmp_array(ret[0], {999});
1 0 cmp_array(ret[0], {999});
270 1 0 cmp_array(ret[1], {888, 777});
1 0 cmp_array(ret[1], {888, 777});
1 0 cmp_array(ret[1], {888, 777});
274 103 0 SECTION("super/super_strict") {
103 0 SECTION("super/super_strict") {
103 0 SECTION("super/super_strict") {
103 0 SECTION("super/super_strict") {
1 102 SECTION("super/super_strict") {
275 1 0 Sub sub("M4::meth");
276 1 0 sub = sub.SUPER();
277 1 0 REQUIRE(sub == Sub("M2::meth"));
1 0 REQUIRE(sub == Sub("M2::meth"));
1 0 REQUIRE(sub == Sub("M2::meth"));
1 0 REQUIRE(sub == Sub("M2::meth"));
1 0 REQUIRE(sub == Sub("M2::meth"));
1 0 REQUIRE(sub == Sub("M2::meth"));
0 0 REQUIRE(sub == Sub("M2::meth"));
0 0 REQUIRE(sub == Sub("M2::meth"));
278 1 0 sub = sub.SUPER_strict();
279 1 0 REQUIRE(sub == Sub("M1::meth"));
1 0 REQUIRE(sub == Sub("M1::meth"));
1 0 REQUIRE(sub == Sub("M1::meth"));
1 0 REQUIRE(sub == Sub("M1::meth"));
1 0 REQUIRE(sub == Sub("M1::meth"));
1 0 REQUIRE(sub == Sub("M1::meth"));
0 0 REQUIRE(sub == Sub("M1::meth"));
0 0 REQUIRE(sub == Sub("M1::meth"));
280 1 0 REQUIRE(!sub.SUPER());
1 0 REQUIRE(!sub.SUPER());
1 0 REQUIRE(!sub.SUPER());
1 0 REQUIRE(!sub.SUPER());
1 0 REQUIRE(!sub.SUPER());
0 0 REQUIRE(!sub.SUPER());
0 0 REQUIRE(!sub.SUPER());
281 1 0 REQUIRE_THROWS(sub.SUPER_strict());
1 0 REQUIRE_THROWS(sub.SUPER_strict());
1 0 REQUIRE_THROWS(sub.SUPER_strict());
0 1 REQUIRE_THROWS(sub.SUPER_strict());
0 0 REQUIRE_THROWS(sub.SUPER_strict());
0 0 REQUIRE_THROWS(sub.SUPER_strict());
1 0 REQUIRE_THROWS(sub.SUPER_strict());
1 0 REQUIRE_THROWS(sub.SUPER_strict());
1 0 REQUIRE_THROWS(sub.SUPER_strict());
283 34 0 }
34 0 }