Branch Coverage

t/svapi/hash.cc
Criterion Covered Total %
branch 1220 2822 43.2


line true false branch
6 90 0 perlvars vars;
7 90 0 Hash my(vars.hv);
10 90 0 SECTION("ctor") {
90 0 SECTION("ctor") {
90 0 SECTION("ctor") {
90 0 SECTION("ctor") {
34 56 SECTION("ctor") {
11 34 0 SECTION("empty") {
34 0 SECTION("empty") {
34 0 SECTION("empty") {
34 0 SECTION("empty") {
1 33 SECTION("empty") {
13 1 0 REQUIRE(!o);
1 0 REQUIRE(!o);
1 0 REQUIRE(!o);
1 0 REQUIRE(!o);
0 0 REQUIRE(!o);
0 0 REQUIRE(!o);
15 34 0 SECTION("from SV") {
34 0 SECTION("from SV") {
34 0 SECTION("from SV") {
34 0 SECTION("from SV") {
24 10 SECTION("from SV") {
16 24 0 SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
24 0 SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
2 22 SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
2 0 SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); }
17 24 0 SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
24 0 SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
24 0 SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
24 0 SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
2 22 SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
2 0 SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); }
18 24 0 SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
24 0 SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
24 0 SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
24 0 SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
2 22 SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
2 0 SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); }
19 24 0 SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
24 0 SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
24 0 SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
24 0 SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
2 22 SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
2 0 SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); }
20 24 0 SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
24 0 SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
2 22 SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
2 0 SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::THROWS); }
21 24 0 SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
24 0 SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
24 0 SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
24 0 SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
2 22 SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
2 0 SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
22 24 0 SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
24 0 SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
2 22 SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
2 0 SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::THROWS); }
23 24 0 SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::VALID); }
24 0 SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::VALID); }
24 0 SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::VALID); }
24 0 SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::VALID); }
2 22 SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::VALID); }
2 0 SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::VALID); }
24 24 0 SECTION("from SHV") { Test::ctor((SV*)vars.stash, behaviour_t::VALID); }
24 0 SECTION("from SHV") { Test::ctor((SV*)vars.stash, behaviour_t::VALID); }
24 0 SECTION("from SHV") { Test::ctor((SV*)vars.stash, behaviour_t::VALID); }
24 0 SECTION("from SHV") { Test::ctor((SV*)vars.stash, behaviour_t::VALID); }
2 22 SECTION("from SHV") { Test::ctor((SV*)vars.stash, behaviour_t::VALID); }
2 0 SECTION("from SHV") { Test::ctor((SV*)vars.stash, behaviour_t::VALID); }
25 24 0 SECTION("from OHV") { Test::ctor((SV*)vars.ohv, behaviour_t::VALID); }
24 0 SECTION("from OHV") { Test::ctor((SV*)vars.ohv, behaviour_t::VALID); }
24 0 SECTION("from OHV") { Test::ctor((SV*)vars.ohv, behaviour_t::VALID); }
24 0 SECTION("from OHV") { Test::ctor((SV*)vars.ohv, behaviour_t::VALID); }
2 22 SECTION("from OHV") { Test::ctor((SV*)vars.ohv, behaviour_t::VALID); }
2 0 SECTION("from OHV") { Test::ctor((SV*)vars.ohv, behaviour_t::VALID); }
26 24 0 SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); }
24 0 SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); }
24 0 SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); }
24 0 SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); }
2 22 SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); }
2 0 SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); }
27 24 0 SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
24 0 SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
2 22 SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
2 0 SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); }
29 34 0 SECTION("from HV") { Test::ctor(vars.hv, behaviour_t::VALID); }
34 0 SECTION("from HV") { Test::ctor(vars.hv, behaviour_t::VALID); }
34 0 SECTION("from HV") { Test::ctor(vars.hv, behaviour_t::VALID); }
34 0 SECTION("from HV") { Test::ctor(vars.hv, behaviour_t::VALID); }
2 32 SECTION("from HV") { Test::ctor(vars.hv, behaviour_t::VALID); }
2 0 SECTION("from HV") { Test::ctor(vars.hv, behaviour_t::VALID); }
31 34 0 SECTION("from Hash") { Test::ctor(my, behaviour_t::VALID); }
34 0 SECTION("from Hash") { Test::ctor(my, behaviour_t::VALID); }
34 0 SECTION("from Hash") { Test::ctor(my, behaviour_t::VALID); }
34 0 SECTION("from Hash") { Test::ctor(my, behaviour_t::VALID); }
2 32 SECTION("from Hash") { Test::ctor(my, behaviour_t::VALID); }
2 0 SECTION("from Hash") { Test::ctor(my, behaviour_t::VALID); }
32 34 0 SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
34 0 SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
34 0 SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
34 0 SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
2 32 SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
2 0 SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); }
33 34 0 SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 0 SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 0 SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 0 SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
2 32 SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
2 0 SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); }
34 34 0 SECTION("from ilist") {
34 0 SECTION("from ilist") {
34 0 SECTION("from ilist") {
34 0 SECTION("from ilist") {
1 33 SECTION("from ilist") {
38 1 0 });
1 0 });
1 0 });
2 1 });
0 0 });
39 1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
40 1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
0 0 REQUIRE(Simple(o["key1"]) == 1);
0 0 REQUIRE(Simple(o["key1"]) == 1);
41 1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
0 0 REQUIRE(Simple(o["key2"]) == "val2");
0 0 REQUIRE(Simple(o["key2"]) == "val2");
45 90 0 SECTION("create") {
90 0 SECTION("create") {
90 0 SECTION("create") {
90 0 SECTION("create") {
3 87 SECTION("create") {
46 3 0 SECTION("empty") {
3 0 SECTION("empty") {
3 0 SECTION("empty") {
3 0 SECTION("empty") {
1 2 SECTION("empty") {
47 1 0 auto o = Hash::create();
48 1 0 REQUIRE(o);
1 0 REQUIRE(o);
1 0 REQUIRE(o);
1 0 REQUIRE(o);
0 0 REQUIRE(o);
0 0 REQUIRE(o);
49 1 0 REQUIRE(o.get());
1 0 REQUIRE(o.get());
1 0 REQUIRE(o.get());
1 0 REQUIRE(o.get());
0 0 REQUIRE(o.get());
0 0 REQUIRE(o.get());
51 3 0 SECTION("ilist") {
3 0 SECTION("ilist") {
3 0 SECTION("ilist") {
3 0 SECTION("ilist") {
1 2 SECTION("ilist") {
55 1 0 });
1 0 });
1 0 });
2 1 });
0 0 });
56 1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
57 1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
1 0 REQUIRE(Simple(o["key1"]) == 1);
0 0 REQUIRE(Simple(o["key1"]) == 1);
0 0 REQUIRE(Simple(o["key1"]) == 1);
58 1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
1 0 REQUIRE(Simple(o["key2"]) == "val2");
0 0 REQUIRE(Simple(o["key2"]) == "val2");
0 0 REQUIRE(Simple(o["key2"]) == "val2");
60 3 0 SECTION("with capacity") {
3 0 SECTION("with capacity") {
3 0 SECTION("with capacity") {
3 0 SECTION("with capacity") {
1 2 SECTION("with capacity") {
61 1 0 auto o = Hash::create(50);
62 1 0 REQUIRE(o.capacity() >= 50);
1 0 REQUIRE(o.capacity() >= 50);
1 0 REQUIRE(o.capacity() >= 50);
1 0 REQUIRE(o.capacity() >= 50);
1 0 REQUIRE(o.capacity() >= 50);
0 0 REQUIRE(o.capacity() >= 50);
0 0 REQUIRE(o.capacity() >= 50);
66 90 0 SECTION("operator=") {
90 0 SECTION("operator=") {
90 0 SECTION("operator=") {
90 0 SECTION("operator=") {
38 52 SECTION("operator=") {
67 38 0 auto o = Hash::create();
68 38 0 SECTION("SV") {
38 0 SECTION("SV") {
38 0 SECTION("SV") {
38 0 SECTION("SV") {
24 14 SECTION("SV") {
69 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); }
70 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); }
71 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); }
72 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); }
73 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); }
74 24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
24 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
2 22 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
2 0 SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::VALID, (SV*)vars.ohv); }
75 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); }
76 24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::VALID); }
24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::VALID); }
24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::VALID); }
24 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::VALID); }
2 22 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::VALID); }
2 0 SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::VALID); }
77 24 0 SECTION("SHV") { Test::assign(o, (SV*)vars.stash, behaviour_t::VALID); }
24 0 SECTION("SHV") { Test::assign(o, (SV*)vars.stash, behaviour_t::VALID); }
24 0 SECTION("SHV") { Test::assign(o, (SV*)vars.stash, behaviour_t::VALID); }
24 0 SECTION("SHV") { Test::assign(o, (SV*)vars.stash, behaviour_t::VALID); }
2 22 SECTION("SHV") { Test::assign(o, (SV*)vars.stash, behaviour_t::VALID); }
2 0 SECTION("SHV") { Test::assign(o, (SV*)vars.stash, behaviour_t::VALID); }
78 24 0 SECTION("OHV") { Test::assign(o, (SV*)vars.ohv, behaviour_t::VALID); }
24 0 SECTION("OHV") { Test::assign(o, (SV*)vars.ohv, behaviour_t::VALID); }
24 0 SECTION("OHV") { Test::assign(o, (SV*)vars.ohv, behaviour_t::VALID); }
24 0 SECTION("OHV") { Test::assign(o, (SV*)vars.ohv, behaviour_t::VALID); }
2 22 SECTION("OHV") { Test::assign(o, (SV*)vars.ohv, behaviour_t::VALID); }
2 0 SECTION("OHV") { Test::assign(o, (SV*)vars.ohv, behaviour_t::VALID); }
79 24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); }
24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); }
24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); }
24 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); }
2 22 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); }
2 0 SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); }
80 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); }
82 38 0 SECTION("HV") { Test::assign(o, vars.hv, behaviour_t::VALID); }
38 0 SECTION("HV") { Test::assign(o, vars.hv, behaviour_t::VALID); }
38 0 SECTION("HV") { Test::assign(o, vars.hv, behaviour_t::VALID); }
38 0 SECTION("HV") { Test::assign(o, vars.hv, behaviour_t::VALID); }
2 36 SECTION("HV") { Test::assign(o, vars.hv, behaviour_t::VALID); }
2 0 SECTION("HV") { Test::assign(o, vars.hv, behaviour_t::VALID); }
83 38 0 SECTION("Hash") { Test::assign(o, my, behaviour_t::VALID); }
38 0 SECTION("Hash") { Test::assign(o, my, behaviour_t::VALID); }
38 0 SECTION("Hash") { Test::assign(o, my, behaviour_t::VALID); }
38 0 SECTION("Hash") { Test::assign(o, my, behaviour_t::VALID); }
4 34 SECTION("Hash") { Test::assign(o, my, behaviour_t::VALID); }
4 0 SECTION("Hash") { Test::assign(o, my, behaviour_t::VALID); }
84 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); }
85 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); }
88 90 0 SECTION("set") {
90 0 SECTION("set") {
90 0 SECTION("set") {
90 0 SECTION("set") {
1 89 SECTION("set") {
90 1 0 o.set(vars.iv); // no checks
91 1 0 REQUIRE(o);
1 0 REQUIRE(o);
1 0 REQUIRE(o);
1 0 REQUIRE(o);
0 0 REQUIRE(o);
0 0 REQUIRE(o);
92 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);
93 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);
96 90 0 SECTION("cast") {
90 0 SECTION("cast") {
90 0 SECTION("cast") {
90 0 SECTION("cast") {
2 88 SECTION("cast") {
97 2 0 Hash o(vars.hv);
99 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") {
101 1 0 REQUIRE(sv == (SV*)vars.hv);
1 0 REQUIRE(sv == (SV*)vars.hv);
1 0 REQUIRE(sv == (SV*)vars.hv);
1 0 REQUIRE(sv == (SV*)vars.hv);
1 0 REQUIRE(sv == (SV*)vars.hv);
0 0 REQUIRE(sv == (SV*)vars.hv);
0 0 REQUIRE(sv == (SV*)vars.hv);
102 1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
104 2 0 SECTION("to HV") {
2 0 SECTION("to HV") {
2 0 SECTION("to HV") {
2 0 SECTION("to HV") {
1 1 SECTION("to HV") {
106 1 0 REQUIRE(sv == vars.hv);
1 0 REQUIRE(sv == vars.hv);
1 0 REQUIRE(sv == vars.hv);
1 0 REQUIRE(sv == vars.hv);
1 0 REQUIRE(sv == vars.hv);
0 0 REQUIRE(sv == vars.hv);
0 0 REQUIRE(sv == vars.hv);
107 1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
111 90 0 SECTION("get") {
90 0 SECTION("get") {
90 0 SECTION("get") {
90 0 SECTION("get") {
1 89 SECTION("get") {
112 1 0 Hash o(vars.hv);
114 1 0 REQUIRE(o.get<>() == (SV*)vars.hv);
1 0 REQUIRE(o.get<>() == (SV*)vars.hv);
1 0 REQUIRE(o.get<>() == (SV*)vars.hv);
1 0 REQUIRE(o.get<>() == (SV*)vars.hv);
1 0 REQUIRE(o.get<>() == (SV*)vars.hv);
0 0 REQUIRE(o.get<>() == (SV*)vars.hv);
0 0 REQUIRE(o.get<>() == (SV*)vars.hv);
115 1 0 REQUIRE(o.get() == (SV*)vars.hv);
1 0 REQUIRE(o.get() == (SV*)vars.hv);
1 0 REQUIRE(o.get() == (SV*)vars.hv);
1 0 REQUIRE(o.get() == (SV*)vars.hv);
1 0 REQUIRE(o.get() == (SV*)vars.hv);
0 0 REQUIRE(o.get() == (SV*)vars.hv);
0 0 REQUIRE(o.get() == (SV*)vars.hv);
116 1 0 REQUIRE(o.get() == vars.hv);
1 0 REQUIRE(o.get() == vars.hv);
1 0 REQUIRE(o.get() == vars.hv);
1 0 REQUIRE(o.get() == vars.hv);
1 0 REQUIRE(o.get() == vars.hv);
0 0 REQUIRE(o.get() == vars.hv);
0 0 REQUIRE(o.get() == vars.hv);
117 1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
1 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
0 0 REQUIRE(SvREFCNT(vars.hv) == rcnt);
120 90 0 SECTION("fetch/[]const/[]/at") {
90 0 SECTION("fetch/[]const/[]/at") {
90 0 SECTION("fetch/[]const/[]/at") {
90 0 SECTION("fetch/[]const/[]/at") {
1 89 SECTION("fetch/[]const/[]/at") {
123 1 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
1 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
1 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
1 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
1 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
0 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
0 0 REQUIRE(!o.fetch("key")); // fetch return empty object when empty
124 1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
0 0 REQUIRE(!co["key"]);
0 0 REQUIRE(!co["key"]);
125 1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
126 1 0 REQUIRE_THROWS(o.at("key"));
1 0 REQUIRE_THROWS(o.at("key"));
1 0 REQUIRE_THROWS(o.at("key"));
0 1 REQUIRE_THROWS(o.at("key"));
0 0 REQUIRE_THROWS(o.at("key"));
0 0 REQUIRE_THROWS(o.at("key"));
1 0 REQUIRE_THROWS(o.at("key"));
1 0 REQUIRE_THROWS(o.at("key"));
1 0 REQUIRE_THROWS(o.at("key"));
128 1 0 o = Hash::create();
129 1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
130 1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
1 0 REQUIRE(!co["key"]);
0 0 REQUIRE(!co["key"]);
0 0 REQUIRE(!co["key"]);
131 1 0 REQUIRE(o["key"]);
1 0 REQUIRE(o["key"]);
1 0 REQUIRE(o["key"]);
1 0 REQUIRE(o["key"]);
1 0 REQUIRE(o["key"]);
0 0 REQUIRE(o["key"]);
0 0 REQUIRE(o["key"]);
132 1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
0 0 REQUIRE(o.fetch("key"));
0 0 REQUIRE(o.fetch("key"));
133 1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
0 0 REQUIRE(o.at("key"));
0 0 REQUIRE(o.at("key"));
134 1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
0 1 REQUIRE_THROWS(o.at("nokey"));
0 0 REQUIRE_THROWS(o.at("nokey"));
0 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
136 1 0 hv_stores(o, "key", newSViv(10));
1 0 hv_stores(o, "key", newSViv(10));
137 1 0 hv_stores(o, "name", newSVpvs("vasya"));
1 0 hv_stores(o, "name", newSVpvs("vasya"));
139 1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
1 0 REQUIRE(o.fetch("key"));
0 0 REQUIRE(o.fetch("key"));
0 0 REQUIRE(o.fetch("key"));
140 1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
1 0 REQUIRE(o.at("key"));
0 0 REQUIRE(o.at("key"));
0 0 REQUIRE(o.at("key"));
141 1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
1 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
0 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
0 0 REQUIRE(Simple(o.fetch("key")).get() == 10);
142 1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
1 0 REQUIRE(Simple(o.at("key")).get() == 10);
0 0 REQUIRE(Simple(o.at("key")).get() == 10);
0 0 REQUIRE(Simple(o.at("key")).get() == 10);
143 1 0 REQUIRE(Simple(co["name"]) == "vasya");
1 0 REQUIRE(Simple(co["name"]) == "vasya");
1 0 REQUIRE(Simple(co["name"]) == "vasya");
1 0 REQUIRE(Simple(co["name"]) == "vasya");
1 0 REQUIRE(Simple(co["name"]) == "vasya");
1 0 REQUIRE(Simple(co["name"]) == "vasya");
1 0 REQUIRE(Simple(co["name"]) == "vasya");
0 0 REQUIRE(Simple(co["name"]) == "vasya");
0 0 REQUIRE(Simple(co["name"]) == "vasya");
144 1 0 REQUIRE(Simple(o["name"]) == "vasya");
1 0 REQUIRE(Simple(o["name"]) == "vasya");
1 0 REQUIRE(Simple(o["name"]) == "vasya");
1 0 REQUIRE(Simple(o["name"]) == "vasya");
1 0 REQUIRE(Simple(o["name"]) == "vasya");
1 0 REQUIRE(Simple(o["name"]) == "vasya");
1 0 REQUIRE(Simple(o["name"]) == "vasya");
0 0 REQUIRE(Simple(o["name"]) == "vasya");
0 0 REQUIRE(Simple(o["name"]) == "vasya");
145 1 0 REQUIRE(!o.fetch("nokey"));
1 0 REQUIRE(!o.fetch("nokey"));
1 0 REQUIRE(!o.fetch("nokey"));
1 0 REQUIRE(!o.fetch("nokey"));
1 0 REQUIRE(!o.fetch("nokey"));
0 0 REQUIRE(!o.fetch("nokey"));
0 0 REQUIRE(!o.fetch("nokey"));
146 1 0 REQUIRE(!co["nokey"]);
1 0 REQUIRE(!co["nokey"]);
1 0 REQUIRE(!co["nokey"]);
1 0 REQUIRE(!co["nokey"]);
1 0 REQUIRE(!co["nokey"]);
0 0 REQUIRE(!co["nokey"]);
0 0 REQUIRE(!co["nokey"]);
147 1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
0 1 REQUIRE_THROWS(o.at("nokey"));
0 0 REQUIRE_THROWS(o.at("nokey"));
0 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
1 0 REQUIRE_THROWS(o.at("nokey"));
148 1 0 REQUIRE(o["nokey"]);
1 0 REQUIRE(o["nokey"]);
1 0 REQUIRE(o["nokey"]);
1 0 REQUIRE(o["nokey"]);
1 0 REQUIRE(o["nokey"]);
0 0 REQUIRE(o["nokey"]);
0 0 REQUIRE(o["nokey"]);
149 1 0 REQUIRE(co["nokey"]);
1 0 REQUIRE(co["nokey"]);
1 0 REQUIRE(co["nokey"]);
1 0 REQUIRE(co["nokey"]);
1 0 REQUIRE(co["nokey"]);
0 0 REQUIRE(co["nokey"]);
0 0 REQUIRE(co["nokey"]);
150 1 0 REQUIRE(o.fetch("nokey"));
1 0 REQUIRE(o.fetch("nokey"));
1 0 REQUIRE(o.fetch("nokey"));
1 0 REQUIRE(o.fetch("nokey"));
1 0 REQUIRE(o.fetch("nokey"));
0 0 REQUIRE(o.fetch("nokey"));
0 0 REQUIRE(o.fetch("nokey"));
153 90 0 SECTION("store/[]=") {
90 0 SECTION("store/[]=") {
90 0 SECTION("store/[]=") {
90 0 SECTION("store/[]=") {
1 89 SECTION("store/[]=") {
155 1 0 REQUIRE_THROWS(o.store("key", Sv()));
1 0 REQUIRE_THROWS(o.store("key", Sv()));
1 0 REQUIRE_THROWS(o.store("key", Sv()));
0 1 REQUIRE_THROWS(o.store("key", Sv()));
0 0 REQUIRE_THROWS(o.store("key", Sv()));
0 0 REQUIRE_THROWS(o.store("key", Sv()));
1 0 REQUIRE_THROWS(o.store("key", Sv()));
1 0 REQUIRE_THROWS(o.store("key", Sv()));
1 0 REQUIRE_THROWS(o.store("key", Sv()));
156 1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
158 1 0 o = Hash::create();
160 1 0 o.store("key", vars.pv);
161 1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
1 0 REQUIRE(Simple(o.fetch("key")) == "hello");
0 0 REQUIRE(Simple(o.fetch("key")) == "hello");
0 0 REQUIRE(Simple(o.fetch("key")) == "hello");
162 1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
0 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
0 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+1);
165 1 0 o["age"] = vars.iv;
1 0 o["age"] = vars.iv;
166 1 0 REQUIRE(o.fetch("age").get() == vars.iv);
1 0 REQUIRE(o.fetch("age").get() == vars.iv);
1 0 REQUIRE(o.fetch("age").get() == vars.iv);
1 0 REQUIRE(o.fetch("age").get() == vars.iv);
1 0 REQUIRE(o.fetch("age").get() == vars.iv);
1 0 REQUIRE(o.fetch("age").get() == vars.iv);
0 0 REQUIRE(o.fetch("age").get() == vars.iv);
0 0 REQUIRE(o.fetch("age").get() == vars.iv);
167 1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
170 1 0 o.store("key", vars.rv);
171 1 0 REQUIRE(o.fetch("key").get() == vars.rv);
1 0 REQUIRE(o.fetch("key").get() == vars.rv);
1 0 REQUIRE(o.fetch("key").get() == vars.rv);
1 0 REQUIRE(o.fetch("key").get() == vars.rv);
1 0 REQUIRE(o.fetch("key").get() == vars.rv);
1 0 REQUIRE(o.fetch("key").get() == vars.rv);
0 0 REQUIRE(o.fetch("key").get() == vars.rv);
0 0 REQUIRE(o.fetch("key").get() == vars.rv);
172 1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
0 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
0 0 REQUIRE(SvREFCNT(vars.pv) == pcnt);
173 1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
0 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
0 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+1);
175 1 0 o["age"] = vars.rv;
1 0 o["age"] = vars.rv;
176 1 0 REQUIRE(o.fetch("age").get() == vars.rv);
1 0 REQUIRE(o.fetch("age").get() == vars.rv);
1 0 REQUIRE(o.fetch("age").get() == vars.rv);
1 0 REQUIRE(o.fetch("age").get() == vars.rv);
1 0 REQUIRE(o.fetch("age").get() == vars.rv);
1 0 REQUIRE(o.fetch("age").get() == vars.rv);
0 0 REQUIRE(o.fetch("age").get() == vars.rv);
0 0 REQUIRE(o.fetch("age").get() == vars.rv);
177 1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
178 1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
1 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
0 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
0 0 REQUIRE(SvREFCNT(vars.rv) == rcnt+2);
180 1 0 o.store("undef", nullptr);
181 1 0 REQUIRE(o.fetch("undef"));
1 0 REQUIRE(o.fetch("undef"));
1 0 REQUIRE(o.fetch("undef"));
1 0 REQUIRE(o.fetch("undef"));
1 0 REQUIRE(o.fetch("undef"));
0 0 REQUIRE(o.fetch("undef"));
0 0 REQUIRE(o.fetch("undef"));
182 1 0 REQUIRE(!o.fetch("undef").defined());
1 0 REQUIRE(!o.fetch("undef").defined());
1 0 REQUIRE(!o.fetch("undef").defined());
1 0 REQUIRE(!o.fetch("undef").defined());
1 0 REQUIRE(!o.fetch("undef").defined());
0 0 REQUIRE(!o.fetch("undef").defined());
0 0 REQUIRE(!o.fetch("undef").defined());
183 1 0 REQUIRE(o.fetch("undef").use_count() == 2);
1 0 REQUIRE(o.fetch("undef").use_count() == 2);
1 0 REQUIRE(o.fetch("undef").use_count() == 2);
1 0 REQUIRE(o.fetch("undef").use_count() == 2);
1 0 REQUIRE(o.fetch("undef").use_count() == 2);
1 0 REQUIRE(o.fetch("undef").use_count() == 2);
0 0 REQUIRE(o.fetch("undef").use_count() == 2);
0 0 REQUIRE(o.fetch("undef").use_count() == 2);
185 1 0 o["u"] = nullptr;
1 0 o["u"] = nullptr;
186 1 0 REQUIRE(o.fetch("u"));
1 0 REQUIRE(o.fetch("u"));
1 0 REQUIRE(o.fetch("u"));
1 0 REQUIRE(o.fetch("u"));
1 0 REQUIRE(o.fetch("u"));
0 0 REQUIRE(o.fetch("u"));
0 0 REQUIRE(o.fetch("u"));
187 1 0 REQUIRE(!o.fetch("u").defined());
1 0 REQUIRE(!o.fetch("u").defined());
1 0 REQUIRE(!o.fetch("u").defined());
1 0 REQUIRE(!o.fetch("u").defined());
1 0 REQUIRE(!o.fetch("u").defined());
0 0 REQUIRE(!o.fetch("u").defined());
0 0 REQUIRE(!o.fetch("u").defined());
188 1 0 REQUIRE(o.fetch("u").use_count() == 2);
1 0 REQUIRE(o.fetch("u").use_count() == 2);
1 0 REQUIRE(o.fetch("u").use_count() == 2);
1 0 REQUIRE(o.fetch("u").use_count() == 2);
1 0 REQUIRE(o.fetch("u").use_count() == 2);
1 0 REQUIRE(o.fetch("u").use_count() == 2);
0 0 REQUIRE(o.fetch("u").use_count() == 2);
0 0 REQUIRE(o.fetch("u").use_count() == 2);
190 1 0 o["a"] = Simple(100);
1 0 o["a"] = Simple(100);
1 0 o["a"] = Simple(100);
191 1 0 o["b"] = o["a"];
1 0 o["b"] = o["a"];
1 0 o["b"] = o["a"];
192 1 0 REQUIRE(o.fetch("b"));
1 0 REQUIRE(o.fetch("b"));
1 0 REQUIRE(o.fetch("b"));
1 0 REQUIRE(o.fetch("b"));
1 0 REQUIRE(o.fetch("b"));
0 0 REQUIRE(o.fetch("b"));
0 0 REQUIRE(o.fetch("b"));
193 1 0 REQUIRE(Simple(o.fetch("b")) == 100);
1 0 REQUIRE(Simple(o.fetch("b")) == 100);
1 0 REQUIRE(Simple(o.fetch("b")) == 100);
1 0 REQUIRE(Simple(o.fetch("b")) == 100);
1 0 REQUIRE(Simple(o.fetch("b")) == 100);
1 0 REQUIRE(Simple(o.fetch("b")) == 100);
1 0 REQUIRE(Simple(o.fetch("b")) == 100);
0 0 REQUIRE(Simple(o.fetch("b")) == 100);
0 0 REQUIRE(Simple(o.fetch("b")) == 100);
195 1 0 o.store("c", o["b"]);
1 0 o.store("c", o["b"]);
196 1 0 REQUIRE(Simple(o.fetch("c")) == 100);
1 0 REQUIRE(Simple(o.fetch("c")) == 100);
1 0 REQUIRE(Simple(o.fetch("c")) == 100);
1 0 REQUIRE(Simple(o.fetch("c")) == 100);
1 0 REQUIRE(Simple(o.fetch("c")) == 100);
1 0 REQUIRE(Simple(o.fetch("c")) == 100);
1 0 REQUIRE(Simple(o.fetch("c")) == 100);
0 0 REQUIRE(Simple(o.fetch("c")) == 100);
0 0 REQUIRE(Simple(o.fetch("c")) == 100);
199 90 0 SECTION("erase") {
90 0 SECTION("erase") {
90 0 SECTION("erase") {
90 0 SECTION("erase") {
1 89 SECTION("erase") {
200 1 0 auto o = Hash::create();
201 1 0 REQUIRE(!o.erase("key"));
1 0 REQUIRE(!o.erase("key"));
1 0 REQUIRE(!o.erase("key"));
1 0 REQUIRE(!o.erase("key"));
1 0 REQUIRE(!o.erase("key"));
0 0 REQUIRE(!o.erase("key"));
0 0 REQUIRE(!o.erase("key"));
202 1 0 o["key"] = vars.pv;
1 0 o["key"] = vars.pv;
203 1 0 Sv elem = o.erase("key");
204 1 0 REQUIRE(elem);
1 0 REQUIRE(elem);
1 0 REQUIRE(elem);
1 0 REQUIRE(elem);
0 0 REQUIRE(elem);
0 0 REQUIRE(elem);
205 1 0 REQUIRE(elem.get() == vars.pv);
1 0 REQUIRE(elem.get() == vars.pv);
1 0 REQUIRE(elem.get() == vars.pv);
1 0 REQUIRE(elem.get() == vars.pv);
1 0 REQUIRE(elem.get() == vars.pv);
0 0 REQUIRE(elem.get() == vars.pv);
0 0 REQUIRE(elem.get() == vars.pv);
206 1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
1 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
0 0 REQUIRE(!o.fetch("key"));
207 1 0 elem.reset();
210 90 0 SECTION("exists") {
90 0 SECTION("exists") {
90 0 SECTION("exists") {
90 0 SECTION("exists") {
1 89 SECTION("exists") {
212 1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
213 1 0 o = Hash::create();
214 1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
215 1 0 o["key"] = nullptr;
1 0 o["key"] = nullptr;
216 1 0 REQUIRE(o.exists("key"));
1 0 REQUIRE(o.exists("key"));
1 0 REQUIRE(o.exists("key"));
1 0 REQUIRE(o.exists("key"));
1 0 REQUIRE(o.exists("key"));
0 0 REQUIRE(o.exists("key"));
0 0 REQUIRE(o.exists("key"));
217 1 0 o.erase("key");
218 1 0 REQUIRE(!o.contains("key"));
1 0 REQUIRE(!o.contains("key"));
1 0 REQUIRE(!o.contains("key"));
1 0 REQUIRE(!o.contains("key"));
1 0 REQUIRE(!o.contains("key"));
0 0 REQUIRE(!o.contains("key"));
0 0 REQUIRE(!o.contains("key"));
221 90 0 SECTION("size") {
90 0 SECTION("size") {
90 0 SECTION("size") {
90 0 SECTION("size") {
1 89 SECTION("size") {
223 1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
224 1 0 o = Hash::create();
225 1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
226 1 0 o["key"] = nullptr;
1 0 o["key"] = nullptr;
227 1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
0 0 REQUIRE(o.size() == 1);
0 0 REQUIRE(o.size() == 1);
228 1 0 o.store("key2", vars.pv);
229 1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
230 1 0 o["key2"] = vars.iv;
1 0 o["key2"] = vars.iv;
231 1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
1 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
0 0 REQUIRE(o.size() == 2);
234 90 0 SECTION("clear/undef") {
90 0 SECTION("clear/undef") {
90 0 SECTION("clear/undef") {
90 0 SECTION("clear/undef") {
1 89 SECTION("clear/undef") {
236 1 0 o.clear();
237 1 0 o.undef();
238 1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
239 1 0 o = Hash::create();
240 1 0 o.clear();
241 1 0 o.undef();
242 1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
244 1 0 o["key"] = vars.iv;
1 0 o["key"] = vars.iv;
245 1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
0 0 REQUIRE(o.size() == 1);
0 0 REQUIRE(o.size() == 1);
246 1 0 o.clear();
247 1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
248 1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
250 1 0 o["key"] = vars.pv;
1 0 o["key"] = vars.pv;
251 1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
1 0 REQUIRE(o.size() == 1);
0 0 REQUIRE(o.size() == 1);
0 0 REQUIRE(o.size() == 1);
252 1 0 o.undef();
253 1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
1 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
0 0 REQUIRE(o.size() == 0);
254 1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
1 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
0 0 REQUIRE(!o.exists("key"));
257 90 0 SECTION("iterate") {
90 0 SECTION("iterate") {
90 0 SECTION("iterate") {
90 0 SECTION("iterate") {
1 89 SECTION("iterate") {
259 1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
0 0 REQUIRE(o.begin() == o.end());
0 0 REQUIRE(o.begin() == o.end());
260 1 0 o = Hash::create();
261 1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
0 0 REQUIRE(o.begin() == o.end());
0 0 REQUIRE(o.begin() == o.end());
264 1 0 o["key"] = vars.iv;
1 0 o["key"] = vars.iv;
265 1 0 o["name"] = vars.pv;
1 0 o["name"] = vars.pv;
266 1 0 o["ref"] = vars.rv;
1 0 o["ref"] = vars.rv;
267 1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
269 1 0 Hash check = Hash::create();
271 1 0 for (auto it = o.begin(); it != o.end(); ++it) {
3 1 for (auto it = o.begin(); it != o.end(); ++it) {
273 3 0 REQUIRE(it->key().length());
3 0 REQUIRE(it->key().length());
3 0 REQUIRE(it->key().length());
3 0 REQUIRE(it->key().length());
0 0 REQUIRE(it->key().length());
0 0 REQUIRE(it->key().length());
274 3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
0 0 REQUIRE(it->value());
0 0 REQUIRE(it->value());
275 3 0 REQUIRE(it->hash());
3 0 REQUIRE(it->hash());
3 0 REQUIRE(it->hash());
3 0 REQUIRE(it->hash());
0 0 REQUIRE(it->hash());
0 0 REQUIRE(it->hash());
276 3 0 check[it->key()] = it->value();
3 0 check[it->key()] = it->value();
3 0 check[it->key()] = it->value();
278 1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
0 0 REQUIRE(cnt == 3);
0 0 REQUIRE(cnt == 3);
279 1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
0 0 REQUIRE(check.size() == 3);
0 0 REQUIRE(check.size() == 3);
280 1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
0 0 REQUIRE(check["key"].get() == vars.iv);
0 0 REQUIRE(check["key"].get() == vars.iv);
281 1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
0 0 REQUIRE(check["name"].get() == vars.pv);
0 0 REQUIRE(check["name"].get() == vars.pv);
282 1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
0 0 REQUIRE(check["ref"].get() == vars.rv);
0 0 REQUIRE(check["ref"].get() == vars.rv);
283 1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+2);
284 1 0 check.clear();
285 1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt+1);
287 1 0 for (auto it = o.begin(); it != o.end(); ++it) {
3 1 for (auto it = o.begin(); it != o.end(); ++it) {
288 3 0 it->value(vars.pv);
290 1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
1 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
0 0 REQUIRE(SvREFCNT(vars.iv) == icnt);
291 1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
1 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
0 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
0 0 REQUIRE(SvREFCNT(vars.pv) == pcnt+3);
292 1 0 REQUIRE(o["key"].get() == vars.pv);
1 0 REQUIRE(o["key"].get() == vars.pv);
1 0 REQUIRE(o["key"].get() == vars.pv);
1 0 REQUIRE(o["key"].get() == vars.pv);
1 0 REQUIRE(o["key"].get() == vars.pv);
1 0 REQUIRE(o["key"].get() == vars.pv);
0 0 REQUIRE(o["key"].get() == vars.pv);
0 0 REQUIRE(o["key"].get() == vars.pv);
293 1 0 REQUIRE(o["name"].get() == vars.pv);
1 0 REQUIRE(o["name"].get() == vars.pv);
1 0 REQUIRE(o["name"].get() == vars.pv);
1 0 REQUIRE(o["name"].get() == vars.pv);
1 0 REQUIRE(o["name"].get() == vars.pv);
1 0 REQUIRE(o["name"].get() == vars.pv);
0 0 REQUIRE(o["name"].get() == vars.pv);
0 0 REQUIRE(o["name"].get() == vars.pv);
294 1 0 REQUIRE(o["ref"].get() == vars.pv);
1 0 REQUIRE(o["ref"].get() == vars.pv);
1 0 REQUIRE(o["ref"].get() == vars.pv);
1 0 REQUIRE(o["ref"].get() == vars.pv);
1 0 REQUIRE(o["ref"].get() == vars.pv);
1 0 REQUIRE(o["ref"].get() == vars.pv);
0 0 REQUIRE(o["ref"].get() == vars.pv);
0 0 REQUIRE(o["ref"].get() == vars.pv);
297 90 0 SECTION("const iterate") {
90 0 SECTION("const iterate") {
90 0 SECTION("const iterate") {
90 0 SECTION("const iterate") {
1 89 SECTION("const iterate") {
300 1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
1 0 REQUIRE(o.begin() == o.end());
0 0 REQUIRE(o.begin() == o.end());
0 0 REQUIRE(o.begin() == o.end());
301 1 0 src = Hash::create();
302 1 0 REQUIRE(o.cbegin() == o.cend());
1 0 REQUIRE(o.cbegin() == o.cend());
1 0 REQUIRE(o.cbegin() == o.cend());
1 0 REQUIRE(o.cbegin() == o.cend());
1 0 REQUIRE(o.cbegin() == o.cend());
1 0 REQUIRE(o.cbegin() == o.cend());
0 0 REQUIRE(o.cbegin() == o.cend());
0 0 REQUIRE(o.cbegin() == o.cend());
303 1 0 src["key"] = vars.iv;
1 0 src["key"] = vars.iv;
304 1 0 src["name"] = vars.pv;
1 0 src["name"] = vars.pv;
305 1 0 src["ref"] = vars.rv;
1 0 src["ref"] = vars.rv;
307 1 0 Hash check = Hash::create();
309 1 0 for (auto it = o.cbegin(); it != o.cend(); ++it) {
3 1 for (auto it = o.cbegin(); it != o.cend(); ++it) {
311 3 0 REQUIRE(it->key().length());
3 0 REQUIRE(it->key().length());
3 0 REQUIRE(it->key().length());
3 0 REQUIRE(it->key().length());
0 0 REQUIRE(it->key().length());
0 0 REQUIRE(it->key().length());
312 3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
3 0 REQUIRE(it->value());
0 0 REQUIRE(it->value());
0 0 REQUIRE(it->value());
313 3 0 REQUIRE(it->hash());
3 0 REQUIRE(it->hash());
3 0 REQUIRE(it->hash());
3 0 REQUIRE(it->hash());
0 0 REQUIRE(it->hash());
0 0 REQUIRE(it->hash());
314 3 0 check[it->key()] = it->value();
3 0 check[it->key()] = it->value();
3 0 check[it->key()] = it->value();
316 1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
1 0 REQUIRE(cnt == 3);
0 0 REQUIRE(cnt == 3);
0 0 REQUIRE(cnt == 3);
317 1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
1 0 REQUIRE(check.size() == 3);
0 0 REQUIRE(check.size() == 3);
0 0 REQUIRE(check.size() == 3);
318 1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
1 0 REQUIRE(check["key"].get() == vars.iv);
0 0 REQUIRE(check["key"].get() == vars.iv);
0 0 REQUIRE(check["key"].get() == vars.iv);
319 1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
1 0 REQUIRE(check["name"].get() == vars.pv);
0 0 REQUIRE(check["name"].get() == vars.pv);
0 0 REQUIRE(check["name"].get() == vars.pv);
320 1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
1 0 REQUIRE(check["ref"].get() == vars.rv);
0 0 REQUIRE(check["ref"].get() == vars.rv);
0 0 REQUIRE(check["ref"].get() == vars.rv);
323 90 0 SECTION("multi-deref") {
90 0 SECTION("multi-deref") {
90 0 SECTION("multi-deref") {
90 0 SECTION("multi-deref") {
1 89 SECTION("multi-deref") {
324 1 0 auto o = Hash::create();
325 1 0 o["key1"] = Ref::create(Array::create({Simple(100)}));
1 0 o["key1"] = Ref::create(Array::create({Simple(100)}));
1 0 o["key1"] = Ref::create(Array::create({Simple(100)}));
1 0 o["key1"] = Ref::create(Array::create({Simple(100)}));
1 0 o["key1"] = Ref::create(Array::create({Simple(100)}));
1 1 o["key1"] = Ref::create(Array::create({Simple(100)}));
0 0 o["key1"] = Ref::create(Array::create({Simple(100)}));
326 1 0 o["key2"] = Simple(1);
1 0 o["key2"] = Simple(1);
1 0 o["key2"] = Simple(1);
327 1 0 Simple res = o["key1"][0];
1 0 Simple res = o["key1"][0];
1 0 Simple res = o["key1"][0];
328 1 0 REQUIRE(res);
1 0 REQUIRE(res);
1 0 REQUIRE(res);
1 0 REQUIRE(res);
0 0 REQUIRE(res);
0 0 REQUIRE(res);
329 1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
0 0 REQUIRE(res == 100);
0 0 REQUIRE(res == 100);
330 1 0 o["key1"][0] = Simple(200);
1 0 o["key1"][0] = Simple(200);
1 0 o["key1"][0] = Simple(200);
1 0 o["key1"][0] = Simple(200);
331 1 0 REQUIRE(o["key1"][0]);
1 0 REQUIRE(o["key1"][0]);
1 0 REQUIRE(o["key1"][0]);
1 0 REQUIRE(o["key1"][0]);
1 0 REQUIRE(o["key1"][0]);
1 0 REQUIRE(o["key1"][0]);
0 0 REQUIRE(o["key1"][0]);
0 0 REQUIRE(o["key1"][0]);
332 1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
1 0 REQUIRE(Simple(o["key1"][0]) == 200);
0 0 REQUIRE(Simple(o["key1"][0]) == 200);
0 0 REQUIRE(Simple(o["key1"][0]) == 200);
333 1 0 REQUIRE_THROWS(o["key2"][0]);
1 0 REQUIRE_THROWS(o["key2"][0]);
1 0 REQUIRE_THROWS(o["key2"][0]);
1 0 REQUIRE_THROWS(o["key2"][0]);
0 1 REQUIRE_THROWS(o["key2"][0]);
0 0 REQUIRE_THROWS(o["key2"][0]);
0 0 REQUIRE_THROWS(o["key2"][0]);
1 0 REQUIRE_THROWS(o["key2"][0]);
1 0 REQUIRE_THROWS(o["key2"][0]);
1 0 REQUIRE_THROWS(o["key2"][0]);
335 1 0 auto h = Hash::create();
336 1 0 h["key"] = Simple(100);
1 0 h["key"] = Simple(100);
1 0 h["key"] = Simple(100);
337 1 0 o.store("key3", Ref::create(h));
1 0 o.store("key3", Ref::create(h));
338 1 0 res = o["key3"]["key"];
1 0 res = o["key3"]["key"];
1 0 res = o["key3"]["key"];
339 1 0 REQUIRE(res);
1 0 REQUIRE(res);
1 0 REQUIRE(res);
1 0 REQUIRE(res);
0 0 REQUIRE(res);
0 0 REQUIRE(res);
340 1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
1 0 REQUIRE(res == 100);
0 0 REQUIRE(res == 100);
0 0 REQUIRE(res == 100);
341 1 0 o["key3"]["key"] = Simple(200);
1 0 o["key3"]["key"] = Simple(200);
1 0 o["key3"]["key"] = Simple(200);
1 0 o["key3"]["key"] = Simple(200);
342 1 0 REQUIRE(o["key3"]["key"]);
1 0 REQUIRE(o["key3"]["key"]);
1 0 REQUIRE(o["key3"]["key"]);
1 0 REQUIRE(o["key3"]["key"]);
1 0 REQUIRE(o["key3"]["key"]);
1 0 REQUIRE(o["key3"]["key"]);
0 0 REQUIRE(o["key3"]["key"]);
0 0 REQUIRE(o["key3"]["key"]);
343 1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
1 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
0 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
0 0 REQUIRE(Simple(o["key3"]["key"]) == 200);
344 1 0 REQUIRE_THROWS(o["key2"]["key"]);
1 0 REQUIRE_THROWS(o["key2"]["key"]);
1 0 REQUIRE_THROWS(o["key2"]["key"]);
1 0 REQUIRE_THROWS(o["key2"]["key"]);
0 1 REQUIRE_THROWS(o["key2"]["key"]);
0 0 REQUIRE_THROWS(o["key2"]["key"]);
0 0 REQUIRE_THROWS(o["key2"]["key"]);
1 0 REQUIRE_THROWS(o["key2"]["key"]);
1 0 REQUIRE_THROWS(o["key2"]["key"]);
1 0 REQUIRE_THROWS(o["key2"]["key"]);
347 90 0 SECTION("capacity") {
90 0 SECTION("capacity") {
90 0 SECTION("capacity") {
90 0 SECTION("capacity") {
1 89 SECTION("capacity") {
349 1 0 REQUIRE(o.capacity() == 0);
1 0 REQUIRE(o.capacity() == 0);
1 0 REQUIRE(o.capacity() == 0);
1 0 REQUIRE(o.capacity() == 0);
1 0 REQUIRE(o.capacity() == 0);
0 0 REQUIRE(o.capacity() == 0);
0 0 REQUIRE(o.capacity() == 0);
350 1 0 o = Hash::create();
351 1 0 o["a"] = Simple(1);
1 0 o["a"] = Simple(1);
1 0 o["a"] = Simple(1);
352 1 0 o["b"] = Simple(1);
1 0 o["b"] = Simple(1);
1 0 o["b"] = Simple(1);
353 1 0 REQUIRE(o.capacity() >= 2);
1 0 REQUIRE(o.capacity() >= 2);
1 0 REQUIRE(o.capacity() >= 2);
1 0 REQUIRE(o.capacity() >= 2);
1 0 REQUIRE(o.capacity() >= 2);
0 0 REQUIRE(o.capacity() >= 2);
0 0 REQUIRE(o.capacity() >= 2);
356 90 0 SECTION("reserve") {
90 0 SECTION("reserve") {
90 0 SECTION("reserve") {
90 0 SECTION("reserve") {
1 89 SECTION("reserve") {
357 1 0 auto o = Hash::create();
358 1 0 o.reserve(100);
359 1 0 REQUIRE(o.capacity() >= 100);
1 0 REQUIRE(o.capacity() >= 100);
1 0 REQUIRE(o.capacity() >= 100);
1 0 REQUIRE(o.capacity() >= 100);
1 0 REQUIRE(o.capacity() >= 100);
0 0 REQUIRE(o.capacity() >= 100);
0 0 REQUIRE(o.capacity() >= 100);
361 34 0 }
34 0 }