line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "test.h" |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
using Test = TestSv; |
4
|
|
|
|
|
|
|
|
5
|
133
|
|
|
|
|
|
TEST_CASE("Array", "[Sv]") { |
6
|
198
|
50
|
|
|
|
|
perlvars vars; |
7
|
198
|
50
|
|
|
|
|
Array my(vars.av); |
8
|
198
|
|
|
|
|
|
Sv oth_valid(vars.oav), oth_invalid(vars.hv); |
9
|
|
|
|
|
|
|
|
10
|
131
|
50
|
|
|
|
|
SECTION("ctor") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
11
|
33
|
50
|
|
|
|
|
SECTION("empty") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
12
|
2
|
|
|
|
|
|
Array o; |
13
|
1
|
50
|
|
|
|
|
REQUIRE(!o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
14
|
|
|
|
|
|
|
} |
15
|
54
|
50
|
|
|
|
|
SECTION("from SV") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
16
|
22
|
50
|
|
|
|
|
SECTION("from undef SV") { Test::ctor(vars.undef, behaviour_t::EMPTY); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
17
|
22
|
50
|
|
|
|
|
SECTION("from number SV") { Test::ctor(vars.iv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
18
|
22
|
50
|
|
|
|
|
SECTION("from string SV") { Test::ctor(vars.pv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
19
|
22
|
50
|
|
|
|
|
SECTION("from RV") { Test::ctor(vars.rv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
20
|
22
|
50
|
|
|
|
|
SECTION("from RV-OAV") { Test::ctor(vars.oavr, behaviour_t::VALID, (SV*)vars.oav); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
21
|
22
|
50
|
|
|
|
|
SECTION("from RV-OHV") { Test::ctor(vars.ohvr, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
22
|
22
|
50
|
|
|
|
|
SECTION("from AV") { Test::ctor((SV*)vars.av, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
23
|
22
|
50
|
|
|
|
|
SECTION("from OAV") { Test::ctor((SV*)vars.oav, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
24
|
22
|
50
|
|
|
|
|
SECTION("from HV") { Test::ctor((SV*)vars.hv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
25
|
22
|
50
|
|
|
|
|
SECTION("from CV") { Test::ctor((SV*)vars.cv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
26
|
22
|
50
|
|
|
|
|
SECTION("from IO") { Test::ctor((SV*)vars.io, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
32
|
50
|
|
|
|
|
SECTION("from AV") { Test::ctor(vars.av, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
32
|
50
|
|
|
|
|
SECTION("from Array") { Test::ctor(my, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
31
|
32
|
50
|
|
|
|
|
SECTION("from valid Sv") { Test::ctor(oth_valid, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
32
|
32
|
50
|
|
|
|
|
SECTION("from invalid Sv") { Test::ctor(oth_invalid, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
33
|
33
|
50
|
|
|
|
|
SECTION("from ilist") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
34
|
4
|
50
|
|
|
|
|
Array o({Simple(100), Simple(200)}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
35
|
1
|
50
|
|
|
|
|
REQUIRE(o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
36
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
37
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[0]) == 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
38
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[1]) == 200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
100
|
50
|
|
|
|
|
SECTION("create empty") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
43
|
2
|
50
|
|
|
|
|
auto o = Array::create(); |
44
|
1
|
50
|
|
|
|
|
REQUIRE(o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
45
|
1
|
50
|
|
|
|
|
REQUIRE(o.get()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
135
|
50
|
|
|
|
|
SECTION("operator=") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
49
|
72
|
50
|
|
|
|
|
auto o = Array::create(); |
50
|
58
|
50
|
|
|
|
|
SECTION("SV") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
51
|
22
|
50
|
|
|
|
|
SECTION("undef SV") { Test::assign(o, vars.undef, behaviour_t::EMPTY); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
52
|
22
|
50
|
|
|
|
|
SECTION("number SV") { Test::assign(o, vars.iv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
53
|
22
|
50
|
|
|
|
|
SECTION("string SV") { Test::assign(o, vars.pv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
54
|
22
|
50
|
|
|
|
|
SECTION("RV") { Test::assign(o, vars.rv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
55
|
22
|
50
|
|
|
|
|
SECTION("RV-OAV") { Test::assign(o, vars.oavr, behaviour_t::VALID, (SV*)vars.oav); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
56
|
22
|
50
|
|
|
|
|
SECTION("RV-OHV") { Test::assign(o, vars.ohvr, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
57
|
22
|
50
|
|
|
|
|
SECTION("AV") { Test::assign(o, (SV*)vars.av, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
58
|
22
|
50
|
|
|
|
|
SECTION("OAV") { Test::assign(o, (SV*)vars.oav, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
59
|
22
|
50
|
|
|
|
|
SECTION("HV") { Test::assign(o, (SV*)vars.hv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
60
|
22
|
50
|
|
|
|
|
SECTION("CV") { Test::assign(o, (SV*)vars.cv, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
61
|
22
|
50
|
|
|
|
|
SECTION("IO") { Test::assign(o, (SV*)vars.io, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
62
|
|
|
|
|
|
|
} |
63
|
36
|
50
|
|
|
|
|
SECTION("AV") { Test::assign(o, vars.av, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
64
|
36
|
50
|
|
|
|
|
SECTION("Array") { Test::assign(o, my, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
65
|
36
|
50
|
|
|
|
|
SECTION("valid Sv") { Test::assign(o, oth_valid, behaviour_t::VALID); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
66
|
36
|
50
|
|
|
|
|
SECTION("invalid Sv") { Test::assign(o, oth_invalid, behaviour_t::THROWS); } |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
100
|
50
|
|
|
|
|
SECTION("set") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
70
|
2
|
|
|
|
|
|
Array o; |
71
|
1
|
50
|
|
|
|
|
o.set(vars.iv); // no checks |
72
|
1
|
50
|
|
|
|
|
REQUIRE(o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
73
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
74
|
1
|
50
|
|
|
|
|
REQUIRE(o.get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
101
|
50
|
|
|
|
|
SECTION("cast") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
78
|
4
|
50
|
|
|
|
|
Array o(vars.av); |
79
|
2
|
|
|
|
|
|
auto rcnt = SvREFCNT(vars.av); |
80
|
3
|
50
|
|
|
|
|
SECTION("to SV") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
81
|
1
|
|
|
|
|
|
SV* sv = o; |
82
|
1
|
50
|
|
|
|
|
REQUIRE(sv == (SV*)vars.av); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
83
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.av) == rcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
84
|
|
|
|
|
|
|
} |
85
|
3
|
50
|
|
|
|
|
SECTION("to AV") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
86
|
1
|
|
|
|
|
|
AV* sv = o; |
87
|
1
|
50
|
|
|
|
|
REQUIRE(sv == vars.av); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
88
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.av) == rcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
100
|
50
|
|
|
|
|
SECTION("get") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
93
|
2
|
50
|
|
|
|
|
Array o(vars.av); |
94
|
1
|
|
|
|
|
|
auto rcnt = SvREFCNT(vars.av); |
95
|
1
|
50
|
|
|
|
|
REQUIRE(o.get<>() == (SV*)vars.av); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
96
|
1
|
50
|
|
|
|
|
REQUIRE(o.get() == (SV*)vars.av); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
97
|
1
|
50
|
|
|
|
|
REQUIRE(o.get() == vars.av); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
98
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.av) == rcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
198
|
50
|
|
|
|
|
auto arr = Array::create(); |
102
|
99
|
50
|
|
|
|
|
av_push(arr, newSViv(777)); |
|
|
50
|
|
|
|
|
|
103
|
99
|
50
|
|
|
|
|
av_push(arr, newSVpvs("fuckit")); |
|
|
50
|
|
|
|
|
|
104
|
99
|
50
|
|
|
|
|
av_store(arr, 9, newSViv(555)); |
|
|
50
|
|
|
|
|
|
105
|
99
|
50
|
|
|
|
|
av_extend(arr, 100-1); |
106
|
|
|
|
|
|
|
|
107
|
100
|
50
|
|
|
|
|
SECTION("size/top_index") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
108
|
2
|
|
|
|
|
|
Array o; |
109
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
110
|
1
|
50
|
|
|
|
|
REQUIRE(o.top_index() == -1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
111
|
1
|
50
|
|
|
|
|
o = Array::create(); |
112
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
113
|
1
|
50
|
|
|
|
|
REQUIRE(o.top_index() == -1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
114
|
1
|
50
|
|
|
|
|
o = arr; |
115
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 10); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
116
|
1
|
50
|
|
|
|
|
REQUIRE(o.top_index() == 9); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
100
|
50
|
|
|
|
|
SECTION("capacity") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
120
|
2
|
|
|
|
|
|
Array o; |
121
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
122
|
1
|
50
|
|
|
|
|
o = Array::create(); |
123
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
124
|
1
|
50
|
|
|
|
|
o = arr; |
125
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() >= 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
100
|
50
|
|
|
|
|
SECTION("[]const") { // unsafe getter |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
129
|
1
|
|
|
|
|
|
const Array& o = arr; |
130
|
1
|
50
|
|
|
|
|
CHECK(Simple(o[0]) == 777); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
131
|
1
|
50
|
|
|
|
|
CHECK(Simple(o[1]) == "fuckit"); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
132
|
|
|
|
|
|
|
if (PERL_VERSION >= 20) { |
133
|
1
|
50
|
|
|
|
|
CHECK(!o[2]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
134
|
1
|
50
|
|
|
|
|
CHECK(!o[90]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
100
|
50
|
|
|
|
|
SECTION("fetch") { // safe getter |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
139
|
2
|
|
|
|
|
|
Array o; |
140
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
141
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(1000)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
1
|
50
|
|
|
|
|
o = Array::create(); |
144
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
145
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(1000)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
1
|
50
|
|
|
|
|
o = arr; |
148
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o.fetch(0)) == 777); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
149
|
|
|
|
|
|
|
if (PERL_VERSION >= 20) { |
150
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(2)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
151
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(90)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
152
|
|
|
|
|
|
|
} |
153
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(900)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
154
|
|
|
|
|
|
|
} |
155
|
|
|
|
|
|
|
|
156
|
100
|
50
|
|
|
|
|
SECTION("at") { // safe getter |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
157
|
2
|
|
|
|
|
|
Array o; |
158
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
159
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(1000)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
1
|
50
|
|
|
|
|
o = Array::create(); |
162
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
163
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(1000)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
1
|
50
|
|
|
|
|
o = arr; |
166
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o.at(0)) == 777); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
167
|
|
|
|
|
|
|
if (PERL_VERSION >= 20) { |
168
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(2)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
169
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(90)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
170
|
|
|
|
|
|
|
} |
171
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.at(900)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
100
|
50
|
|
|
|
|
SECTION("[]") { // unsafe getter |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
175
|
2
|
50
|
|
|
|
|
Array o = arr; |
176
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[0]) == 777); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
177
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[1]) == "fuckit"); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
178
|
|
|
|
|
|
|
if (PERL_VERSION >= 20) { |
179
|
1
|
50
|
|
|
|
|
REQUIRE(!o[2]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
180
|
1
|
50
|
|
|
|
|
REQUIRE(!o[90]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
|
184
|
100
|
50
|
|
|
|
|
SECTION("[]=") { // unsafe setter |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
185
|
2
|
50
|
|
|
|
|
Array o = arr; |
186
|
1
|
50
|
|
|
|
|
o[2] = Simple(333); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
187
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o.fetch(2)) == 333); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
188
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
189
|
1
|
|
|
|
|
|
auto pcnt = SvREFCNT(vars.pv); |
190
|
1
|
50
|
|
|
|
|
o[3] = vars.iv; |
|
|
50
|
|
|
|
|
|
191
|
1
|
50
|
|
|
|
|
REQUIRE(o[3].get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
192
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
193
|
1
|
50
|
|
|
|
|
o[3] = vars.pv; |
|
|
50
|
|
|
|
|
|
194
|
1
|
50
|
|
|
|
|
REQUIRE(o[3].get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
195
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
196
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
197
|
1
|
50
|
|
|
|
|
o[3] = nullptr; |
|
|
50
|
|
|
|
|
|
198
|
1
|
50
|
|
|
|
|
REQUIRE(!o[3]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
199
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
200
|
|
|
|
|
|
|
|
201
|
1
|
50
|
|
|
|
|
o[3] = o[2]; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
202
|
1
|
50
|
|
|
|
|
REQUIRE(o.fetch(3)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
203
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o.fetch(3)) == 333); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
204
|
|
|
|
|
|
|
} |
205
|
|
|
|
|
|
|
|
206
|
100
|
50
|
|
|
|
|
SECTION("store") { // safe setter |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
207
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
208
|
1
|
|
|
|
|
|
auto pcnt = SvREFCNT(vars.pv); |
209
|
|
|
|
|
|
|
|
210
|
2
|
|
|
|
|
|
Array o; |
211
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o.store(0, vars.iv)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
1
|
50
|
|
|
|
|
o = arr; |
214
|
1
|
50
|
|
|
|
|
o.store(0, vars.iv); |
215
|
1
|
50
|
|
|
|
|
REQUIRE(o[0] == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
216
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 10); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
217
|
1
|
50
|
|
|
|
|
o.store(5, vars.iv); |
218
|
1
|
50
|
|
|
|
|
REQUIRE(o[5] == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
219
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 10); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
220
|
1
|
50
|
|
|
|
|
o.store(10, vars.pv); |
221
|
1
|
50
|
|
|
|
|
REQUIRE(o[10] == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
222
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 11); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
223
|
1
|
50
|
|
|
|
|
o.store(95, vars.pv); |
224
|
1
|
50
|
|
|
|
|
REQUIRE(o[95] == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
225
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 96); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
226
|
1
|
50
|
|
|
|
|
o.store(1000, vars.pv); |
227
|
1
|
50
|
|
|
|
|
REQUIRE(o[1000] == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
228
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 1001); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
229
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() >= 1001); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
230
|
1
|
50
|
|
|
|
|
o.store(0, nullptr); |
231
|
1
|
50
|
|
|
|
|
o.store(5, nullptr); |
232
|
1
|
50
|
|
|
|
|
o.store(10, nullptr); |
233
|
1
|
50
|
|
|
|
|
o.store(95, nullptr); |
234
|
1
|
50
|
|
|
|
|
o.store(1000, nullptr); |
235
|
1
|
50
|
|
|
|
|
REQUIRE(!o[0]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
236
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
237
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
1
|
50
|
|
|
|
|
o[0] = Simple(111); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
240
|
1
|
50
|
|
|
|
|
o.store(1000, o[0]); |
|
|
50
|
|
|
|
|
|
241
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[1000]) == 111); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
100
|
50
|
|
|
|
|
SECTION("reserve") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
245
|
2
|
50
|
|
|
|
|
auto o = Array::create(); |
246
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
247
|
1
|
50
|
|
|
|
|
o = Array::create(10); |
248
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() >= 10); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
249
|
1
|
50
|
|
|
|
|
o.reserve(1000); |
250
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() >= 1000); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
|
253
|
100
|
50
|
|
|
|
|
SECTION("resize") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
254
|
2
|
50
|
|
|
|
|
auto o = Array::create(); |
255
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
256
|
1
|
50
|
|
|
|
|
o.resize(10); |
257
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 10); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
258
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() >= 10); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
259
|
|
|
|
|
|
|
|
260
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
261
|
1
|
50
|
|
|
|
|
o[9] = vars.iv; |
|
|
50
|
|
|
|
|
|
262
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
263
|
1
|
50
|
|
|
|
|
o.resize(9); |
264
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 9); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
265
|
1
|
50
|
|
|
|
|
REQUIRE(!o.fetch(9)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
266
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
|
269
|
100
|
50
|
|
|
|
|
SECTION("exists") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
270
|
2
|
|
|
|
|
|
Array o; |
271
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
272
|
1
|
50
|
|
|
|
|
o = Array::create(); |
273
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
274
|
1
|
50
|
|
|
|
|
o.reserve(2); |
275
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
276
|
1
|
50
|
|
|
|
|
o.resize(2); |
277
|
1
|
50
|
|
|
|
|
if (PERL_VERSION >= 20) REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
278
|
1
|
50
|
|
|
|
|
o.store(1, vars.iv); |
279
|
1
|
50
|
|
|
|
|
if (PERL_VERSION >= 20) REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
280
|
1
|
50
|
|
|
|
|
REQUIRE(o.exists(1)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
281
|
1
|
50
|
|
|
|
|
av_delete(o, 1, 0); |
282
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(1)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
283
|
|
|
|
|
|
|
} |
284
|
|
|
|
|
|
|
|
285
|
100
|
50
|
|
|
|
|
SECTION("del") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
286
|
2
|
|
|
|
|
|
Array o; |
287
|
1
|
50
|
|
|
|
|
REQUIRE(!o.del(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
288
|
1
|
50
|
|
|
|
|
o = Array::create(); |
289
|
1
|
50
|
|
|
|
|
REQUIRE(!o.del(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
290
|
1
|
50
|
|
|
|
|
o.reserve(2); |
291
|
1
|
50
|
|
|
|
|
REQUIRE(!o.del(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
292
|
1
|
50
|
|
|
|
|
o.resize(2); |
293
|
1
|
50
|
|
|
|
|
if (PERL_VERSION >= 20) REQUIRE(!o.del(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
294
|
|
|
|
|
|
|
|
295
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
296
|
1
|
50
|
|
|
|
|
o[0] = vars.iv; |
|
|
50
|
|
|
|
|
|
297
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
298
|
1
|
50
|
|
|
|
|
o[1] = vars.pv; |
|
|
50
|
|
|
|
|
|
299
|
1
|
50
|
|
|
|
|
REQUIRE(o.del(0).get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
300
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
301
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
|
304
|
103
|
50
|
|
|
|
|
SECTION("create") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
305
|
5
|
50
|
|
|
|
|
SECTION("capacity") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
306
|
2
|
50
|
|
|
|
|
auto o = Array::create(50); |
307
|
1
|
50
|
|
|
|
|
REQUIRE(o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
308
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() >= 50); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
309
|
|
|
|
|
|
|
} |
310
|
5
|
50
|
|
|
|
|
SECTION("from SV**") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
311
|
2
|
50
|
|
|
|
|
auto o = Array::create(0, NULL); |
312
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
313
|
1
|
50
|
|
|
|
|
o = Array::create(0, NULL, Array::COPY); |
314
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
316
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv), pcnt = SvREFCNT(vars.pv), rcnt = SvREFCNT(vars.rv); |
317
|
1
|
|
|
|
|
|
SV* args[] = {vars.iv, vars.pv, vars.rv}; |
318
|
1
|
50
|
|
|
|
|
o = Array::create(3, args); |
319
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 3); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
320
|
1
|
50
|
|
|
|
|
REQUIRE(o[0].get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
321
|
1
|
50
|
|
|
|
|
REQUIRE(o[1].get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
322
|
1
|
50
|
|
|
|
|
REQUIRE(o[2].get() == vars.rv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
323
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
324
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
325
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.rv) == rcnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
326
|
1
|
50
|
|
|
|
|
o.reset(); |
327
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
328
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
329
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.rv) == rcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
330
|
|
|
|
|
|
|
|
331
|
1
|
50
|
|
|
|
|
o = Array::create(3, args, Array::COPY); |
332
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 3); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
333
|
1
|
50
|
|
|
|
|
REQUIRE(o[0].get() != vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
334
|
1
|
50
|
|
|
|
|
REQUIRE(o[1].get() != vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
335
|
1
|
50
|
|
|
|
|
REQUIRE(o[2].get() != vars.rv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
336
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
337
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
338
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.rv) == rcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
339
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[0]) == SvIVX(vars.iv)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
340
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[1]).get() == SvPVX(vars.pv)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
341
|
1
|
50
|
|
|
|
|
REQUIRE(Ref(o[2]).value().get() == SvRV(vars.rv)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
342
|
|
|
|
|
|
|
} |
343
|
|
|
|
|
|
|
|
344
|
5
|
50
|
|
|
|
|
SECTION("from Array") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
345
|
2
|
50
|
|
|
|
|
Array from = Array::create(); |
346
|
1
|
50
|
|
|
|
|
from.push(Simple(100)); |
|
|
50
|
|
|
|
|
|
347
|
2
|
50
|
|
|
|
|
auto o = Array::create(from); |
348
|
1
|
50
|
|
|
|
|
REQUIRE(o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
349
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
350
|
1
|
50
|
|
|
|
|
REQUIRE(o[0] == from[0]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
351
|
|
|
|
|
|
|
} |
352
|
|
|
|
|
|
|
|
353
|
5
|
50
|
|
|
|
|
SECTION("from ilist") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
354
|
4
|
50
|
|
|
|
|
auto o = Array::create({Simple(100), Simple(200)}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
355
|
1
|
50
|
|
|
|
|
REQUIRE(o); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
356
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
357
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[0]) == 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
358
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[1]) == 200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
} |
361
|
|
|
|
|
|
|
|
362
|
100
|
50
|
|
|
|
|
SECTION("shift") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
363
|
2
|
|
|
|
|
|
Array o; |
364
|
1
|
50
|
|
|
|
|
REQUIRE(!o.shift()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
365
|
1
|
50
|
|
|
|
|
o = Array::create(); |
366
|
1
|
50
|
|
|
|
|
REQUIRE(!o.shift()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
367
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv), pcnt = SvREFCNT(vars.pv); |
368
|
1
|
50
|
|
|
|
|
o.store(1, vars.iv); |
369
|
1
|
50
|
|
|
|
|
o.store(3, vars.pv); |
370
|
1
|
50
|
|
|
|
|
REQUIRE(!o.shift()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
371
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 3); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
372
|
2
|
50
|
|
|
|
|
auto elem = o.shift(); |
373
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
374
|
1
|
50
|
|
|
|
|
REQUIRE(elem.get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
375
|
1
|
50
|
|
|
|
|
elem.reset(); |
376
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
377
|
1
|
50
|
|
|
|
|
REQUIRE(!o.shift()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
378
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
379
|
1
|
50
|
|
|
|
|
elem = o.shift(); |
380
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
381
|
1
|
50
|
|
|
|
|
REQUIRE(elem.get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
382
|
1
|
50
|
|
|
|
|
elem.reset(); |
383
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
384
|
1
|
50
|
|
|
|
|
REQUIRE(!o.shift()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
385
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
386
|
|
|
|
|
|
|
} |
387
|
|
|
|
|
|
|
|
388
|
100
|
50
|
|
|
|
|
SECTION("pop") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
389
|
2
|
|
|
|
|
|
Array o; |
390
|
1
|
50
|
|
|
|
|
REQUIRE(!o.pop()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
391
|
1
|
50
|
|
|
|
|
o = Array::create(); |
392
|
1
|
50
|
|
|
|
|
REQUIRE(!o.pop()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
393
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv), pcnt = SvREFCNT(vars.pv); |
394
|
1
|
50
|
|
|
|
|
o.store(0, vars.iv); |
395
|
1
|
50
|
|
|
|
|
o.store(2, vars.pv); |
396
|
1
|
50
|
|
|
|
|
o.resize(4); |
397
|
1
|
50
|
|
|
|
|
REQUIRE(!o.pop()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
398
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 3); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
399
|
2
|
50
|
|
|
|
|
auto elem = o.pop(); |
400
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
401
|
1
|
50
|
|
|
|
|
REQUIRE(elem.get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
402
|
1
|
50
|
|
|
|
|
elem.reset(); |
403
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
404
|
1
|
50
|
|
|
|
|
REQUIRE(!o.pop()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
405
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
406
|
1
|
50
|
|
|
|
|
elem = o.pop(); |
407
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
408
|
1
|
50
|
|
|
|
|
REQUIRE(elem.get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
409
|
1
|
50
|
|
|
|
|
elem.reset(); |
410
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
411
|
1
|
50
|
|
|
|
|
REQUIRE(!o.pop()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
412
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
|
415
|
100
|
50
|
|
|
|
|
SECTION("push") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
416
|
2
|
50
|
|
|
|
|
auto o = Array::create(); |
417
|
1
|
50
|
|
|
|
|
o.push(Scalar()); |
418
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
419
|
1
|
50
|
|
|
|
|
REQUIRE(!o[0]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
420
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
421
|
1
|
50
|
|
|
|
|
o.push(vars.iv); |
422
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
423
|
1
|
50
|
|
|
|
|
REQUIRE(o[1].get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
424
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
425
|
4
|
50
|
|
|
|
|
o.push({vars.pv, vars.rv, vars.ovr}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
426
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 5); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
427
|
1
|
50
|
|
|
|
|
REQUIRE(o[2].get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
428
|
1
|
50
|
|
|
|
|
REQUIRE(o[3].get() == vars.rv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
429
|
1
|
50
|
|
|
|
|
REQUIRE(o[4].get() == vars.ovr); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
430
|
3
|
50
|
|
|
|
|
o.push(List(Array::create({Simple(100), Simple(200)}))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
431
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 7); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
432
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[5]) == 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
433
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[6]) == 200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
434
|
|
|
|
|
|
|
} |
435
|
|
|
|
|
|
|
|
436
|
100
|
50
|
|
|
|
|
SECTION("unshift") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
437
|
2
|
50
|
|
|
|
|
auto o = Array::create(); |
438
|
1
|
50
|
|
|
|
|
o.unshift(Scalar()); |
439
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
440
|
1
|
50
|
|
|
|
|
REQUIRE(!o[0]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
441
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
442
|
1
|
50
|
|
|
|
|
o.unshift(vars.iv); |
443
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
444
|
1
|
50
|
|
|
|
|
REQUIRE(o[0].get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
445
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
446
|
4
|
50
|
|
|
|
|
o.unshift({vars.pv, vars.rv, vars.ovr}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
447
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 5); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
448
|
1
|
50
|
|
|
|
|
REQUIRE(o[0].get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
449
|
1
|
50
|
|
|
|
|
REQUIRE(o[1].get() == vars.rv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
450
|
1
|
50
|
|
|
|
|
REQUIRE(o[2].get() == vars.ovr); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
451
|
3
|
50
|
|
|
|
|
o.unshift(List(Array::create({Simple(100), Simple(200)}))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
452
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 7); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
453
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[0]) == 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
454
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[1]) == 200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
455
|
|
|
|
|
|
|
} |
456
|
|
|
|
|
|
|
|
457
|
100
|
50
|
|
|
|
|
SECTION("clear/undef") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
458
|
2
|
|
|
|
|
|
Array o; |
459
|
1
|
50
|
|
|
|
|
o.clear(); |
460
|
1
|
50
|
|
|
|
|
o.undef(); |
461
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
462
|
1
|
50
|
|
|
|
|
o = Array::create(); |
463
|
1
|
50
|
|
|
|
|
o.clear(); |
464
|
1
|
50
|
|
|
|
|
o.undef(); |
465
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
466
|
|
|
|
|
|
|
|
467
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv), pcnt = SvREFCNT(vars.pv); |
468
|
3
|
50
|
|
|
|
|
o.push({vars.iv, vars.pv}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
469
|
1
|
50
|
|
|
|
|
auto cap = o.capacity(); |
470
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
471
|
1
|
50
|
|
|
|
|
o.clear(); |
472
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
473
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
474
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() == cap); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
475
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
476
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
477
|
|
|
|
|
|
|
|
478
|
3
|
50
|
|
|
|
|
o.push({vars.iv, vars.pv}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
479
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
480
|
1
|
50
|
|
|
|
|
o.undef(); |
481
|
1
|
50
|
|
|
|
|
REQUIRE(o.size() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
482
|
1
|
50
|
|
|
|
|
REQUIRE(!o.exists(0)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
483
|
1
|
50
|
|
|
|
|
REQUIRE(o.capacity() == 0); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
484
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
485
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
|
488
|
100
|
50
|
|
|
|
|
SECTION("iterate") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
489
|
2
|
|
|
|
|
|
Array o; |
490
|
1
|
50
|
|
|
|
|
REQUIRE(o.begin() == o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
491
|
1
|
50
|
|
|
|
|
o = Array::create(); |
492
|
1
|
50
|
|
|
|
|
REQUIRE(o.begin() == o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
493
|
1
|
|
|
|
|
|
auto icnt = SvREFCNT(vars.iv); |
494
|
1
|
|
|
|
|
|
auto pcnt = SvREFCNT(vars.pv); |
495
|
4
|
50
|
|
|
|
|
o.push({vars.iv, vars.pv, vars.rv}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
496
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
497
|
|
|
|
|
|
|
|
498
|
1
|
50
|
|
|
|
|
auto it = o.begin(); |
499
|
1
|
50
|
|
|
|
|
REQUIRE(it != o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
500
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
501
|
1
|
50
|
|
|
|
|
REQUIRE(it[1].get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
502
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
503
|
1
|
|
|
|
|
|
++it; |
504
|
1
|
50
|
|
|
|
|
REQUIRE(it != o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
505
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
506
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt+1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
507
|
1
|
|
|
|
|
|
++it; |
508
|
1
|
50
|
|
|
|
|
REQUIRE(it != o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
509
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.rv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
510
|
1
|
|
|
|
|
|
++it; |
511
|
1
|
50
|
|
|
|
|
REQUIRE(it == o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
512
|
|
|
|
|
|
|
|
513
|
1
|
|
|
|
|
|
it -= 3; |
514
|
1
|
50
|
|
|
|
|
*it = vars.pv; |
|
|
50
|
|
|
|
|
|
515
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
516
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.iv) == icnt); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
517
|
1
|
50
|
|
|
|
|
REQUIRE(SvREFCNT(vars.pv) == pcnt+2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
518
|
|
|
|
|
|
|
} |
519
|
|
|
|
|
|
|
|
520
|
100
|
50
|
|
|
|
|
SECTION("const iterate") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
521
|
2
|
|
|
|
|
|
Array src; |
522
|
1
|
|
|
|
|
|
const Array& o = src; |
523
|
1
|
50
|
|
|
|
|
REQUIRE(o.begin() == o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
524
|
1
|
50
|
|
|
|
|
src = Array::create(); |
525
|
1
|
50
|
|
|
|
|
REQUIRE(o.cbegin() == o.cend()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
526
|
4
|
50
|
|
|
|
|
src.push({vars.iv, vars.pv, vars.rv}); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
527
|
|
|
|
|
|
|
|
528
|
1
|
50
|
|
|
|
|
auto it = o.cbegin(); |
529
|
1
|
50
|
|
|
|
|
REQUIRE(it != o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
530
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.iv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
531
|
1
|
50
|
|
|
|
|
REQUIRE(it[1].get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
532
|
1
|
|
|
|
|
|
++it; |
533
|
1
|
50
|
|
|
|
|
REQUIRE(it != o.end()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
534
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.pv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
535
|
1
|
|
|
|
|
|
++it; |
536
|
1
|
50
|
|
|
|
|
REQUIRE(it != o.cend()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
537
|
1
|
50
|
|
|
|
|
REQUIRE((*it).get() == vars.rv); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
538
|
1
|
|
|
|
|
|
++it; |
539
|
1
|
50
|
|
|
|
|
REQUIRE(it == o.cend()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
540
|
|
|
|
|
|
|
} |
541
|
|
|
|
|
|
|
|
542
|
100
|
50
|
|
|
|
|
SECTION("multi-deref") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
543
|
5
|
50
|
|
|
|
|
auto o = Array::create({ Ref::create(Array::create({Simple(100)})), Simple(1) }); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
544
|
2
|
50
|
|
|
|
|
Simple res = o[0][0]; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
545
|
1
|
50
|
|
|
|
|
REQUIRE(res); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
546
|
1
|
50
|
|
|
|
|
REQUIRE(res == 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
547
|
1
|
50
|
|
|
|
|
o[0][0] = Simple(200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
548
|
1
|
50
|
|
|
|
|
REQUIRE(o[0][0]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
549
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[0][0]) == 200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
550
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o[1][0]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
551
|
|
|
|
|
|
|
|
552
|
2
|
50
|
|
|
|
|
auto h = Hash::create(); |
553
|
1
|
50
|
|
|
|
|
h["key"] = Simple(100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
554
|
1
|
50
|
|
|
|
|
o.store(2, Ref::create(h)); |
|
|
50
|
|
|
|
|
|
555
|
1
|
50
|
|
|
|
|
res = o[2]["key"]; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
556
|
1
|
50
|
|
|
|
|
REQUIRE(res); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
557
|
1
|
50
|
|
|
|
|
REQUIRE(res == 100); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
558
|
1
|
50
|
|
|
|
|
o[2]["key"] = Simple(200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
559
|
1
|
50
|
|
|
|
|
REQUIRE(o[2]["key"]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
560
|
1
|
50
|
|
|
|
|
REQUIRE(Simple(o[2]["key"]) == 200); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
561
|
1
|
50
|
|
|
|
|
REQUIRE_THROWS(o[1]["key"]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
562
|
|
|
|
|
|
|
} |
563
|
|
|
|
|
|
|
|
564
|
100
|
50
|
|
|
|
|
SECTION("front") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
565
|
2
|
|
|
|
|
|
Array o; |
566
|
1
|
50
|
|
|
|
|
REQUIRE(!o.front()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
567
|
1
|
50
|
|
|
|
|
o = Array::create(); |
568
|
1
|
50
|
|
|
|
|
REQUIRE(!o.front()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
569
|
2
|
50
|
|
|
|
|
auto v1 = Simple(10); |
570
|
1
|
50
|
|
|
|
|
o.push(v1); |
571
|
1
|
50
|
|
|
|
|
REQUIRE(o.front() == v1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
572
|
2
|
50
|
|
|
|
|
auto v2 = Simple(111); |
573
|
1
|
50
|
|
|
|
|
o.unshift(v2); |
574
|
1
|
50
|
|
|
|
|
REQUIRE(o.front() == v2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
575
|
|
|
|
|
|
|
} |
576
|
|
|
|
|
|
|
|
577
|
100
|
50
|
|
|
|
|
SECTION("back") { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
578
|
2
|
|
|
|
|
|
Array o; |
579
|
1
|
50
|
|
|
|
|
REQUIRE(!o.back()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
580
|
1
|
50
|
|
|
|
|
o = Array::create(); |
581
|
1
|
50
|
|
|
|
|
REQUIRE(!o.back()); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
582
|
2
|
50
|
|
|
|
|
auto v1 = Simple(10); |
583
|
1
|
50
|
|
|
|
|
o.push(v1); |
584
|
1
|
50
|
|
|
|
|
REQUIRE(o.back() == v1); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
585
|
2
|
50
|
|
|
|
|
auto v2 = Simple(111); |
586
|
1
|
50
|
|
|
|
|
o.push(v2); |
587
|
1
|
50
|
|
|
|
|
REQUIRE(o.back() == v2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
588
|
|
|
|
|
|
|
} |
589
|
235
|
50
|
|
|
|
|
} |
|
|
50
|
|
|
|
|
|