line |
true |
false |
branch |
12
|
0 |
55 |
struct Test : Tracer, Refcnt { |
|
7 |
0 |
struct Test : Tracer, Refcnt { |
13
|
48 |
0 |
using Tracer::Tracer; |
16
|
0 |
20 |
struct TestChild : Test { |
20
|
0 |
1 |
struct TestDel : Tracer, Refcntd { |
|
1 |
0 |
struct TestDel : Tracer, Refcntd { |
26
|
0 |
1 |
struct TestRes : Tracer, Refcntd { |
30
|
1 |
0 |
TestRes () : resurected() {} |
34
|
1 |
1 |
if (resurected) return; |
63
|
46 |
0 |
SECTION("ctor") { |
|
46 |
0 |
SECTION("ctor") { |
|
46 |
0 |
SECTION("ctor") { |
|
46 |
0 |
SECTION("ctor") { |
|
6 |
40 |
SECTION("ctor") { |
64
|
6 |
0 |
SECTION("empty") { |
|
6 |
0 |
SECTION("empty") { |
|
6 |
0 |
SECTION("empty") { |
|
6 |
0 |
SECTION("empty") { |
|
1 |
5 |
SECTION("empty") { |
67
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
68
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
70
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
73
|
6 |
0 |
SECTION("from object") { |
|
6 |
0 |
SECTION("from object") { |
|
6 |
0 |
SECTION("from object") { |
|
6 |
0 |
SECTION("from object") { |
|
1 |
5 |
SECTION("from object") { |
75
|
1 |
0 |
auto p = TestSP(new Test()); |
|
1 |
0 |
auto p = TestSP(new Test()); |
76
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
77
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
78
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
80
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
83
|
6 |
0 |
SECTION("from iptr") { |
|
6 |
0 |
SECTION("from iptr") { |
|
6 |
0 |
SECTION("from iptr") { |
|
6 |
0 |
SECTION("from iptr") { |
|
1 |
5 |
SECTION("from iptr") { |
85
|
1 |
0 |
auto src = TestSP(new Test()); |
|
1 |
0 |
auto src = TestSP(new Test()); |
86
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
88
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
89
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
90
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p->refcnt() == 2); |
92
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
95
|
6 |
0 |
SECTION("from foreign iptr") { |
|
6 |
0 |
SECTION("from foreign iptr") { |
|
6 |
0 |
SECTION("from foreign iptr") { |
|
6 |
0 |
SECTION("from foreign iptr") { |
|
1 |
5 |
SECTION("from foreign iptr") { |
97
|
1 |
0 |
auto src = TestChildSP(new TestChild()); |
|
1 |
0 |
auto src = TestChildSP(new TestChild()); |
98
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
100
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
101
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
102
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p->refcnt() == 2); |
104
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
107
|
6 |
0 |
SECTION("move from iptr") { |
|
6 |
0 |
SECTION("move from iptr") { |
|
6 |
0 |
SECTION("move from iptr") { |
|
6 |
0 |
SECTION("move from iptr") { |
|
1 |
5 |
SECTION("move from iptr") { |
109
|
1 |
0 |
auto src = TestSP(new Test(123)); |
|
1 |
0 |
auto src = TestSP(new Test(123)); |
111
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
112
|
1 |
0 |
REQUIRE(!src); |
|
1 |
0 |
REQUIRE(!src); |
|
1 |
0 |
REQUIRE(!src); |
|
1 |
0 |
REQUIRE(!src); |
|
0 |
0 |
REQUIRE(!src); |
|
0 |
0 |
REQUIRE(!src); |
113
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
114
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
115
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
0 |
0 |
REQUIRE(p->value == 123); |
|
0 |
0 |
REQUIRE(p->value == 123); |
117
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
120
|
6 |
0 |
SECTION("move from foreign iptr") { |
|
6 |
0 |
SECTION("move from foreign iptr") { |
|
6 |
0 |
SECTION("move from foreign iptr") { |
|
6 |
0 |
SECTION("move from foreign iptr") { |
|
1 |
5 |
SECTION("move from foreign iptr") { |
122
|
1 |
0 |
auto src = TestChildSP(new TestChild(321)); |
|
1 |
0 |
auto src = TestChildSP(new TestChild(321)); |
124
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
125
|
1 |
0 |
REQUIRE(!src); |
|
1 |
0 |
REQUIRE(!src); |
|
1 |
0 |
REQUIRE(!src); |
|
1 |
0 |
REQUIRE(!src); |
|
0 |
0 |
REQUIRE(!src); |
|
0 |
0 |
REQUIRE(!src); |
126
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
127
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
128
|
1 |
0 |
REQUIRE(p->value == 321); |
|
1 |
0 |
REQUIRE(p->value == 321); |
|
1 |
0 |
REQUIRE(p->value == 321); |
|
1 |
0 |
REQUIRE(p->value == 321); |
|
1 |
0 |
REQUIRE(p->value == 321); |
|
0 |
0 |
REQUIRE(p->value == 321); |
|
0 |
0 |
REQUIRE(p->value == 321); |
130
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
134
|
46 |
0 |
SECTION("reset") { |
|
46 |
0 |
SECTION("reset") { |
|
46 |
0 |
SECTION("reset") { |
|
46 |
0 |
SECTION("reset") { |
|
3 |
43 |
SECTION("reset") { |
135
|
3 |
0 |
SECTION("no args") { |
|
3 |
0 |
SECTION("no args") { |
|
3 |
0 |
SECTION("no args") { |
|
3 |
0 |
SECTION("no args") { |
|
1 |
2 |
SECTION("no args") { |
136
|
1 |
0 |
auto p = TestSP(new Test()); |
|
1 |
0 |
auto p = TestSP(new Test()); |
137
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
139
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
140
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
143
|
3 |
0 |
SECTION("with same object") { |
|
3 |
0 |
SECTION("with same object") { |
|
3 |
0 |
SECTION("with same object") { |
|
3 |
0 |
SECTION("with same object") { |
|
1 |
2 |
SECTION("with same object") { |
144
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
145
|
1 |
0 |
auto o = new Test(2); |
|
1 |
0 |
auto o = new Test(2); |
146
|
1 |
0 |
p.reset(o); |
147
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
148
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
149
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
151
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
152
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
155
|
3 |
0 |
SECTION("foreign object") { |
|
3 |
0 |
SECTION("foreign object") { |
|
3 |
0 |
SECTION("foreign object") { |
|
3 |
0 |
SECTION("foreign object") { |
|
1 |
2 |
SECTION("foreign object") { |
156
|
1 |
0 |
auto p = TestSP(new Test(10)); |
|
1 |
0 |
auto p = TestSP(new Test(10)); |
157
|
1 |
0 |
auto o = new TestChild(20); |
|
1 |
0 |
auto o = new TestChild(20); |
158
|
1 |
0 |
p.reset(o); |
159
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
160
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
161
|
1 |
0 |
REQUIRE(p->value == 20); |
|
1 |
0 |
REQUIRE(p->value == 20); |
|
1 |
0 |
REQUIRE(p->value == 20); |
|
1 |
0 |
REQUIRE(p->value == 20); |
|
1 |
0 |
REQUIRE(p->value == 20); |
|
0 |
0 |
REQUIRE(p->value == 20); |
|
0 |
0 |
REQUIRE(p->value == 20); |
163
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
164
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
168
|
46 |
0 |
SECTION("assign") { |
|
46 |
0 |
SECTION("assign") { |
|
46 |
0 |
SECTION("assign") { |
|
46 |
0 |
SECTION("assign") { |
|
14 |
32 |
SECTION("assign") { |
169
|
14 |
0 |
SECTION("NULL") { |
|
14 |
0 |
SECTION("NULL") { |
|
14 |
0 |
SECTION("NULL") { |
|
14 |
0 |
SECTION("NULL") { |
|
2 |
12 |
SECTION("NULL") { |
170
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
173
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 0); |
174
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
175
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
177
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
179
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
180
|
1 |
0 |
auto p = TestSP(new Test()); |
|
1 |
0 |
auto p = TestSP(new Test()); |
182
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
183
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
184
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
186
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
190
|
14 |
0 |
SECTION("same object") { |
|
14 |
0 |
SECTION("same object") { |
|
14 |
0 |
SECTION("same object") { |
|
14 |
0 |
SECTION("same object") { |
|
2 |
12 |
SECTION("same object") { |
191
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
193
|
1 |
0 |
p = new Test(2); |
|
1 |
0 |
p = new Test(2); |
194
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
195
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
196
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
197
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
198
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
200
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
202
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
203
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
204
|
1 |
0 |
p = new Test(2); |
|
1 |
0 |
p = new Test(2); |
205
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
206
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
207
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
208
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
209
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
211
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
215
|
14 |
0 |
SECTION("foreign object") { |
|
14 |
0 |
SECTION("foreign object") { |
|
14 |
0 |
SECTION("foreign object") { |
|
14 |
0 |
SECTION("foreign object") { |
|
2 |
12 |
SECTION("foreign object") { |
216
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
218
|
1 |
0 |
p = new TestChild(2); |
|
1 |
0 |
p = new TestChild(2); |
219
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
220
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
221
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
222
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
223
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
225
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
227
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
228
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
229
|
1 |
0 |
p = new TestChild(2); |
|
1 |
0 |
p = new TestChild(2); |
230
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
231
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
232
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
233
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
234
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
236
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
240
|
14 |
0 |
SECTION("same iptr") { |
|
14 |
0 |
SECTION("same iptr") { |
|
14 |
0 |
SECTION("same iptr") { |
|
14 |
0 |
SECTION("same iptr") { |
|
2 |
12 |
SECTION("same iptr") { |
241
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
243
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
245
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
246
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
247
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
248
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
250
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
251
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
253
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
255
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
256
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
257
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
259
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
260
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
261
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
262
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
264
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
265
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
267
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
271
|
14 |
0 |
SECTION("foreign iptr") { |
|
14 |
0 |
SECTION("foreign iptr") { |
|
14 |
0 |
SECTION("foreign iptr") { |
|
14 |
0 |
SECTION("foreign iptr") { |
|
2 |
12 |
SECTION("foreign iptr") { |
272
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
274
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
276
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
277
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
278
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
279
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
281
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
282
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
284
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
286
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
287
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
288
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
290
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
291
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
292
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
293
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 2); |
295
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
296
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
298
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
302
|
14 |
0 |
SECTION("move same iptr") { |
|
14 |
0 |
SECTION("move same iptr") { |
|
14 |
0 |
SECTION("move same iptr") { |
|
14 |
0 |
SECTION("move same iptr") { |
|
2 |
12 |
SECTION("move same iptr") { |
303
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
305
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
307
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
308
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
309
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
310
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
311
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
312
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
0 |
0 |
REQUIRE(!p2); |
|
0 |
0 |
REQUIRE(!p2); |
314
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
316
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
318
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
319
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
320
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
|
1 |
0 |
auto p2 = TestSP(new Test(2)); |
322
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
323
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
324
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
325
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
326
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
327
|
1 |
0 |
REQUIRE(p2); |
|
1 |
0 |
REQUIRE(p2); |
|
1 |
0 |
REQUIRE(p2); |
|
1 |
0 |
REQUIRE(p2); |
|
0 |
0 |
REQUIRE(p2); |
|
0 |
0 |
REQUIRE(p2); |
328
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
329
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
0 |
0 |
REQUIRE(p2->value == 1); |
|
0 |
0 |
REQUIRE(p2->value == 1); |
331
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
332
|
1 |
0 |
REQUIRE(p2); |
|
1 |
0 |
REQUIRE(p2); |
|
1 |
0 |
REQUIRE(p2); |
|
1 |
0 |
REQUIRE(p2); |
|
0 |
0 |
REQUIRE(p2); |
|
0 |
0 |
REQUIRE(p2); |
333
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p2->refcnt() == 1); |
334
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
1 |
0 |
REQUIRE(p2->value == 1); |
|
0 |
0 |
REQUIRE(p2->value == 1); |
|
0 |
0 |
REQUIRE(p2->value == 1); |
335
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
337
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
341
|
14 |
0 |
SECTION("move foreign iptr") { |
|
14 |
0 |
SECTION("move foreign iptr") { |
|
14 |
0 |
SECTION("move foreign iptr") { |
|
14 |
0 |
SECTION("move foreign iptr") { |
|
2 |
12 |
SECTION("move foreign iptr") { |
342
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
2 |
0 |
SECTION("from empty") { |
|
1 |
1 |
SECTION("from empty") { |
344
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
346
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 1); |
347
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 0); |
348
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
349
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
350
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
351
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
0 |
0 |
REQUIRE(!p2); |
|
0 |
0 |
REQUIRE(!p2); |
353
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
355
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
357
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
2 |
0 |
SECTION("from object") { |
|
1 |
1 |
SECTION("from object") { |
358
|
1 |
0 |
auto p = TestSP(new Test(1)); |
|
1 |
0 |
auto p = TestSP(new Test(1)); |
359
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
|
1 |
0 |
auto p2 = TestChildSP(new TestChild(2)); |
361
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::ctor_calls == 2); |
362
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 1); |
363
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
364
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
1 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
|
0 |
0 |
REQUIRE(p->refcnt() == 1); |
365
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
1 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
|
0 |
0 |
REQUIRE(p->value == 2); |
366
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
1 |
0 |
REQUIRE(!p2); |
|
0 |
0 |
REQUIRE(!p2); |
|
0 |
0 |
REQUIRE(!p2); |
368
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
1 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
|
0 |
0 |
REQUIRE(!p); |
369
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
371
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
1 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
|
0 |
0 |
REQUIRE(Tracer::dtor_calls == 2); |
376
|
46 |
0 |
SECTION("dereference") { |
|
46 |
0 |
SECTION("dereference") { |
|
46 |
0 |
SECTION("dereference") { |
|
46 |
0 |
SECTION("dereference") { |
|
1 |
45 |
SECTION("dereference") { |
377
|
1 |
0 |
auto obj = new Test(123); |
|
1 |
0 |
auto obj = new Test(123); |
379
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
1 |
0 |
REQUIRE(p->value == 123); |
|
0 |
0 |
REQUIRE(p->value == 123); |
|
0 |
0 |
REQUIRE(p->value == 123); |
380
|
1 |
0 |
REQUIRE((*p).value == 123); |
|
1 |
0 |
REQUIRE((*p).value == 123); |
|
1 |
0 |
REQUIRE((*p).value == 123); |
|
1 |
0 |
REQUIRE((*p).value == 123); |
|
1 |
0 |
REQUIRE((*p).value == 123); |
|
0 |
0 |
REQUIRE((*p).value == 123); |
|
0 |
0 |
REQUIRE((*p).value == 123); |
381
|
1 |
0 |
REQUIRE(p.get()->value == 123); |
|
1 |
0 |
REQUIRE(p.get()->value == 123); |
|
1 |
0 |
REQUIRE(p.get()->value == 123); |
|
1 |
0 |
REQUIRE(p.get()->value == 123); |
|
1 |
0 |
REQUIRE(p.get()->value == 123); |
|
0 |
0 |
REQUIRE(p.get()->value == 123); |
|
0 |
0 |
REQUIRE(p.get()->value == 123); |
382
|
1 |
0 |
REQUIRE(p.get() == obj); |
|
1 |
0 |
REQUIRE(p.get() == obj); |
|
1 |
0 |
REQUIRE(p.get() == obj); |
|
1 |
0 |
REQUIRE(p.get() == obj); |
|
1 |
0 |
REQUIRE(p.get() == obj); |
|
0 |
0 |
REQUIRE(p.get() == obj); |
|
0 |
0 |
REQUIRE(p.get() == obj); |
383
|
1 |
0 |
REQUIRE(((Test*)p)->value == 123); |
|
1 |
0 |
REQUIRE(((Test*)p)->value == 123); |
|
1 |
0 |
REQUIRE(((Test*)p)->value == 123); |
|
1 |
0 |
REQUIRE(((Test*)p)->value == 123); |
|
1 |
0 |
REQUIRE(((Test*)p)->value == 123); |
|
0 |
0 |
REQUIRE(((Test*)p)->value == 123); |
|
0 |
0 |
REQUIRE(((Test*)p)->value == 123); |
384
|
1 |
0 |
REQUIRE((Test*)p == obj); |
|
1 |
0 |
REQUIRE((Test*)p == obj); |
|
1 |
0 |
REQUIRE((Test*)p == obj); |
|
1 |
0 |
REQUIRE((Test*)p == obj); |
|
1 |
0 |
REQUIRE((Test*)p == obj); |
|
0 |
0 |
REQUIRE((Test*)p == obj); |
|
0 |
0 |
REQUIRE((Test*)p == obj); |
385
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
1 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
|
0 |
0 |
REQUIRE(p); |
386
|
1 |
0 |
REQUIRE((bool)p == true); |
|
1 |
0 |
REQUIRE((bool)p == true); |
|
1 |
0 |
REQUIRE((bool)p == true); |
|
1 |
0 |
REQUIRE((bool)p == true); |
|
1 |
0 |
REQUIRE((bool)p == true); |
|
0 |
0 |
REQUIRE((bool)p == true); |
|
0 |
0 |
REQUIRE((bool)p == true); |
389
|
46 |
0 |
SECTION("ops") { |
|
46 |
0 |
SECTION("ops") { |
|
46 |
0 |
SECTION("ops") { |
|
46 |
0 |
SECTION("ops") { |
|
1 |
45 |
SECTION("ops") { |
390
|
1 |
0 |
auto ptr = new Test(123); |
|
1 |
0 |
auto ptr = new Test(123); |
393
|
1 |
0 |
CHECK(sp1 == sp2); |
|
1 |
0 |
CHECK(sp1 == sp2); |
|
1 |
0 |
CHECK(sp1 == sp2); |
|
1 |
0 |
CHECK(sp1 == sp2); |
|
1 |
0 |
CHECK(sp1 == sp2); |
|
0 |
0 |
CHECK(sp1 == sp2); |
|
0 |
0 |
CHECK(sp1 == sp2); |
394
|
1 |
0 |
CHECK(sp1 == ptr); |
|
1 |
0 |
CHECK(sp1 == ptr); |
|
1 |
0 |
CHECK(sp1 == ptr); |
|
1 |
0 |
CHECK(sp1 == ptr); |
|
1 |
0 |
CHECK(sp1 == ptr); |
|
0 |
0 |
CHECK(sp1 == ptr); |
|
0 |
0 |
CHECK(sp1 == ptr); |
397
|
46 |
0 |
SECTION("weak") { |
|
46 |
0 |
SECTION("weak") { |
|
46 |
0 |
SECTION("weak") { |
|
46 |
0 |
SECTION("weak") { |
|
18 |
28 |
SECTION("weak") { |
398
|
18 |
0 |
SECTION("ctor") { |
|
18 |
0 |
SECTION("ctor") { |
|
18 |
0 |
SECTION("ctor") { |
|
18 |
0 |
SECTION("ctor") { |
|
8 |
10 |
SECTION("ctor") { |
399
|
8 |
0 |
SECTION("empty") { |
|
8 |
0 |
SECTION("empty") { |
|
8 |
0 |
SECTION("empty") { |
|
8 |
0 |
SECTION("empty") { |
|
1 |
7 |
SECTION("empty") { |
400
|
1 |
0 |
TestWP empty; |
401
|
1 |
0 |
CHECK_FALSE(empty); |
|
1 |
0 |
CHECK_FALSE(empty); |
|
1 |
0 |
CHECK_FALSE(empty); |
|
1 |
0 |
CHECK_FALSE(empty); |
|
1 |
0 |
CHECK_FALSE(empty); |
|
0 |
0 |
CHECK_FALSE(empty); |
|
0 |
0 |
CHECK_FALSE(empty); |
403
|
8 |
0 |
SECTION("from iptr") { |
|
8 |
0 |
SECTION("from iptr") { |
|
8 |
0 |
SECTION("from iptr") { |
|
8 |
0 |
SECTION("from iptr") { |
|
2 |
6 |
SECTION("from iptr") { |
404
|
2 |
0 |
SECTION("base") { |
|
2 |
0 |
SECTION("base") { |
|
2 |
0 |
SECTION("base") { |
|
2 |
0 |
SECTION("base") { |
|
1 |
1 |
SECTION("base") { |
405
|
1 |
0 |
TestSP obj = new Test(123); |
|
1 |
0 |
TestSP obj = new Test(123); |
406
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
407
|
1 |
0 |
TestWP weak = obj; |
408
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
410
|
2 |
0 |
SECTION("derived") { |
|
2 |
0 |
SECTION("derived") { |
|
2 |
0 |
SECTION("derived") { |
|
2 |
0 |
SECTION("derived") { |
|
1 |
1 |
SECTION("derived") { |
411
|
1 |
0 |
TestChildSP obj = new TestChild(123); |
|
1 |
0 |
TestChildSP obj = new TestChild(123); |
412
|
1 |
0 |
TestWP weak = obj; |
413
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
1 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
416
|
8 |
0 |
SECTION("from bad") { |
|
8 |
0 |
SECTION("from bad") { |
|
8 |
0 |
SECTION("from bad") { |
|
8 |
0 |
SECTION("from bad") { |
|
2 |
6 |
SECTION("from bad") { |
417
|
2 |
0 |
SECTION("bad iptr") { |
|
2 |
0 |
SECTION("bad iptr") { |
|
2 |
0 |
SECTION("bad iptr") { |
|
2 |
0 |
SECTION("bad iptr") { |
|
1 |
1 |
SECTION("bad iptr") { |
419
|
1 |
0 |
TestWP weak(nothing); |
420
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
0 |
0 |
CHECK_FALSE(weak); |
|
0 |
0 |
CHECK_FALSE(weak); |
423
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
1 |
1 |
SECTION("bad weak_iptr") { |
424
|
1 |
0 |
TestWP nothing; |
425
|
1 |
0 |
TestWP weak(nothing); |
426
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
1 |
0 |
CHECK_FALSE(weak); |
|
0 |
0 |
CHECK_FALSE(weak); |
|
0 |
0 |
CHECK_FALSE(weak); |
430
|
8 |
0 |
SECTION("from weak") { |
|
8 |
0 |
SECTION("from weak") { |
|
8 |
0 |
SECTION("from weak") { |
|
8 |
0 |
SECTION("from weak") { |
|
3 |
5 |
SECTION("from weak") { |
431
|
3 |
0 |
TestSP base = new Test(123); |
|
3 |
0 |
TestSP base = new Test(123); |
432
|
3 |
0 |
TestChildSP der = new TestChild(123); |
|
3 |
0 |
TestChildSP der = new TestChild(123); |
433
|
3 |
0 |
TestWP wbase = base; |
434
|
3 |
0 |
TestChildWP wder = der; |
436
|
3 |
0 |
SECTION("base") { |
|
3 |
0 |
SECTION("base") { |
|
3 |
0 |
SECTION("base") { |
|
3 |
0 |
SECTION("base") { |
|
1 |
2 |
SECTION("base") { |
437
|
1 |
0 |
TestWP weak = wbase; |
438
|
1 |
0 |
CHECK(weak.lock() == base); |
|
1 |
0 |
CHECK(weak.lock() == base); |
|
1 |
0 |
CHECK(weak.lock() == base); |
|
1 |
0 |
CHECK(weak.lock() == base); |
|
1 |
0 |
CHECK(weak.lock() == base); |
|
1 |
0 |
CHECK(weak.lock() == base); |
|
0 |
0 |
CHECK(weak.lock() == base); |
|
0 |
0 |
CHECK(weak.lock() == base); |
439
|
1 |
0 |
CHECK(base->refcnt() == 1); |
|
1 |
0 |
CHECK(base->refcnt() == 1); |
|
1 |
0 |
CHECK(base->refcnt() == 1); |
|
1 |
0 |
CHECK(base->refcnt() == 1); |
|
1 |
0 |
CHECK(base->refcnt() == 1); |
|
0 |
0 |
CHECK(base->refcnt() == 1); |
|
0 |
0 |
CHECK(base->refcnt() == 1); |
441
|
3 |
0 |
SECTION("derived") { |
|
3 |
0 |
SECTION("derived") { |
|
3 |
0 |
SECTION("derived") { |
|
3 |
0 |
SECTION("derived") { |
|
1 |
2 |
SECTION("derived") { |
443
|
1 |
0 |
CHECK(weak.lock() == der); |
|
1 |
0 |
CHECK(weak.lock() == der); |
|
1 |
0 |
CHECK(weak.lock() == der); |
|
1 |
0 |
CHECK(weak.lock() == der); |
|
1 |
0 |
CHECK(weak.lock() == der); |
|
1 |
0 |
CHECK(weak.lock() == der); |
|
0 |
0 |
CHECK(weak.lock() == der); |
|
0 |
0 |
CHECK(weak.lock() == der); |
444
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
0 |
0 |
CHECK(der->refcnt() == 1); |
|
0 |
0 |
CHECK(der->refcnt() == 1); |
447
|
3 |
0 |
SECTION("move") { |
|
3 |
0 |
SECTION("move") { |
|
3 |
0 |
SECTION("move") { |
|
3 |
0 |
SECTION("move") { |
|
1 |
2 |
SECTION("move") { |
448
|
1 |
0 |
TestWP moved(std::move(wbase)); |
449
|
1 |
0 |
CHECK(moved.weak_count() == 1); |
|
1 |
0 |
CHECK(moved.weak_count() == 1); |
|
1 |
0 |
CHECK(moved.weak_count() == 1); |
|
1 |
0 |
CHECK(moved.weak_count() == 1); |
|
1 |
0 |
CHECK(moved.weak_count() == 1); |
|
0 |
0 |
CHECK(moved.weak_count() == 1); |
|
0 |
0 |
CHECK(moved.weak_count() == 1); |
450
|
1 |
0 |
CHECK(moved.use_count() == 1); |
|
1 |
0 |
CHECK(moved.use_count() == 1); |
|
1 |
0 |
CHECK(moved.use_count() == 1); |
|
1 |
0 |
CHECK(moved.use_count() == 1); |
|
1 |
0 |
CHECK(moved.use_count() == 1); |
|
0 |
0 |
CHECK(moved.use_count() == 1); |
|
0 |
0 |
CHECK(moved.use_count() == 1); |
455
|
18 |
0 |
SECTION("assign") { |
|
18 |
0 |
SECTION("assign") { |
|
18 |
0 |
SECTION("assign") { |
|
18 |
0 |
SECTION("assign") { |
|
6 |
12 |
SECTION("assign") { |
456
|
6 |
0 |
TestWP empty; |
457
|
6 |
0 |
TestSP base = new Test(123); |
|
6 |
0 |
TestSP base = new Test(123); |
458
|
6 |
0 |
TestChildSP der = new TestChild(123); |
|
6 |
0 |
TestChildSP der = new TestChild(123); |
459
|
6 |
0 |
TestWP wbase = base; |
460
|
6 |
0 |
TestChildWP wder = der; |
462
|
6 |
0 |
TestWP wbase2; |
463
|
6 |
0 |
TestChildWP wder2; |
465
|
6 |
0 |
SECTION("empty") { |
|
6 |
0 |
SECTION("empty") { |
|
6 |
0 |
SECTION("empty") { |
|
6 |
0 |
SECTION("empty") { |
|
1 |
5 |
SECTION("empty") { |
466
|
1 |
0 |
TestWP e2; |
467
|
1 |
0 |
e2 = empty; |
468
|
1 |
0 |
CHECK_FALSE(e2); |
|
1 |
0 |
CHECK_FALSE(e2); |
|
1 |
0 |
CHECK_FALSE(e2); |
|
1 |
0 |
CHECK_FALSE(e2); |
|
1 |
0 |
CHECK_FALSE(e2); |
|
0 |
0 |
CHECK_FALSE(e2); |
|
0 |
0 |
CHECK_FALSE(e2); |
471
|
6 |
0 |
SECTION("base") { |
|
6 |
0 |
SECTION("base") { |
|
6 |
0 |
SECTION("base") { |
|
6 |
0 |
SECTION("base") { |
|
1 |
5 |
SECTION("base") { |
472
|
1 |
0 |
wbase2 = base; |
473
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
0 |
0 |
CHECK(wbase2.lock() == base); |
|
0 |
0 |
CHECK(wbase2.lock() == base); |
474
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
475
|
1 |
0 |
wbase2 = der; |
476
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
0 |
0 |
CHECK(wbase2.lock() == der); |
|
0 |
0 |
CHECK(wbase2.lock() == der); |
477
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
478
|
1 |
0 |
wbase2 = wbase; |
479
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
0 |
0 |
CHECK(wbase2.lock() == base); |
|
0 |
0 |
CHECK(wbase2.lock() == base); |
480
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
481
|
1 |
0 |
wbase2 = wder; |
482
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
0 |
0 |
CHECK(wbase2.lock() == der); |
|
0 |
0 |
CHECK(wbase2.lock() == der); |
483
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 2); |
485
|
6 |
0 |
SECTION("derived") { |
|
6 |
0 |
SECTION("derived") { |
|
6 |
0 |
SECTION("derived") { |
|
6 |
0 |
SECTION("derived") { |
|
1 |
5 |
SECTION("derived") { |
486
|
1 |
0 |
wder2 = der; |
487
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
0 |
0 |
CHECK(wder2.lock() == der); |
|
0 |
0 |
CHECK(wder2.lock() == der); |
488
|
1 |
0 |
wder2 = wder; |
489
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
1 |
0 |
CHECK(wder2.lock() == der); |
|
0 |
0 |
CHECK(wder2.lock() == der); |
|
0 |
0 |
CHECK(wder2.lock() == der); |
490
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
1 |
0 |
CHECK(der->refcnt() == 1); |
|
0 |
0 |
CHECK(der->refcnt() == 1); |
|
0 |
0 |
CHECK(der->refcnt() == 1); |
493
|
6 |
0 |
SECTION("move") { |
|
6 |
0 |
SECTION("move") { |
|
6 |
0 |
SECTION("move") { |
|
6 |
0 |
SECTION("move") { |
|
1 |
5 |
SECTION("move") { |
494
|
1 |
0 |
wbase2 = std::move(wbase); |
495
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
1 |
0 |
CHECK(wbase2.lock() == base); |
|
0 |
0 |
CHECK(wbase2.lock() == base); |
|
0 |
0 |
CHECK(wbase2.lock() == base); |
496
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 1); |
498
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
1 |
0 |
CHECK(wbase2.lock() == der); |
|
0 |
0 |
CHECK(wbase2.lock() == der); |
|
0 |
0 |
CHECK(wbase2.lock() == der); |
499
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
1 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 1); |
|
0 |
0 |
CHECK(wbase2.weak_count() == 1); |
502
|
6 |
0 |
SECTION("from bad") { |
|
6 |
0 |
SECTION("from bad") { |
|
6 |
0 |
SECTION("from bad") { |
|
6 |
0 |
SECTION("from bad") { |
|
2 |
4 |
SECTION("from bad") { |
503
|
2 |
0 |
SECTION("bad iptr") { |
|
2 |
0 |
SECTION("bad iptr") { |
|
2 |
0 |
SECTION("bad iptr") { |
|
2 |
0 |
SECTION("bad iptr") { |
|
1 |
1 |
SECTION("bad iptr") { |
505
|
1 |
0 |
wbase2 = nothing; |
508
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
2 |
0 |
SECTION("bad weak_iptr") { |
|
1 |
1 |
SECTION("bad weak_iptr") { |
509
|
1 |
0 |
TestWP nothing; |
510
|
1 |
0 |
wbase2 = nothing; |
512
|
2 |
0 |
CHECK_FALSE(wbase2); |
|
2 |
0 |
CHECK_FALSE(wbase2); |
|
2 |
0 |
CHECK_FALSE(wbase2); |
|
2 |
0 |
CHECK_FALSE(wbase2); |
|
2 |
0 |
CHECK_FALSE(wbase2); |
|
0 |
0 |
CHECK_FALSE(wbase2); |
|
0 |
0 |
CHECK_FALSE(wbase2); |
513
|
2 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
2 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
2 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
2 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
2 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
2 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
0 |
0 |
CHECK_FALSE(wbase2.lock()); |
|
0 |
0 |
CHECK_FALSE(wbase2.lock()); |
517
|
18 |
0 |
SECTION("lock") { |
|
18 |
0 |
SECTION("lock") { |
|
18 |
0 |
SECTION("lock") { |
|
18 |
0 |
SECTION("lock") { |
|
2 |
16 |
SECTION("lock") { |
519
|
2 |
0 |
TestWP weak; |
520
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
0 |
0 |
CHECK_FALSE(weak.lock()); |
|
0 |
0 |
CHECK_FALSE(weak.lock()); |
522
|
2 |
0 |
SECTION("base") { |
|
2 |
0 |
SECTION("base") { |
|
2 |
0 |
SECTION("base") { |
|
2 |
0 |
SECTION("base") { |
|
1 |
1 |
SECTION("base") { |
523
|
1 |
0 |
obj = new Test(123); |
|
1 |
0 |
obj = new Test(123); |
525
|
2 |
0 |
SECTION("derived") { |
|
2 |
0 |
SECTION("derived") { |
|
2 |
0 |
SECTION("derived") { |
|
2 |
0 |
SECTION("derived") { |
|
1 |
1 |
SECTION("derived") { |
526
|
1 |
0 |
obj = new TestChild(123); |
|
1 |
0 |
obj = new TestChild(123); |
528
|
2 |
0 |
weak = obj; |
530
|
2 |
0 |
if (TestSP tmp = weak.lock()) { |
|
2 |
0 |
if (TestSP tmp = weak.lock()) { |
531
|
2 |
0 |
CHECK(obj->refcnt() == 2); |
|
2 |
0 |
CHECK(obj->refcnt() == 2); |
|
2 |
0 |
CHECK(obj->refcnt() == 2); |
|
2 |
0 |
CHECK(obj->refcnt() == 2); |
|
2 |
0 |
CHECK(obj->refcnt() == 2); |
|
0 |
0 |
CHECK(obj->refcnt() == 2); |
|
0 |
0 |
CHECK(obj->refcnt() == 2); |
532
|
2 |
0 |
CHECK(obj == tmp); |
|
2 |
0 |
CHECK(obj == tmp); |
|
2 |
0 |
CHECK(obj == tmp); |
|
2 |
0 |
CHECK(obj == tmp); |
|
2 |
0 |
CHECK(obj == tmp); |
|
0 |
0 |
CHECK(obj == tmp); |
|
0 |
0 |
CHECK(obj == tmp); |
534
|
2 |
0 |
CHECK(obj->refcnt() == 1); |
|
2 |
0 |
CHECK(obj->refcnt() == 1); |
|
2 |
0 |
CHECK(obj->refcnt() == 1); |
|
2 |
0 |
CHECK(obj->refcnt() == 1); |
|
2 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
|
0 |
0 |
CHECK(obj->refcnt() == 1); |
536
|
2 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
2 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
2 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
2 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
2 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 1); |
537
|
2 |
0 |
CHECK(weak.expired()); |
|
2 |
0 |
CHECK(weak.expired()); |
|
2 |
0 |
CHECK(weak.expired()); |
|
2 |
0 |
CHECK(weak.expired()); |
|
0 |
0 |
CHECK(weak.expired()); |
|
0 |
0 |
CHECK(weak.expired()); |
538
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
2 |
0 |
CHECK_FALSE(weak.lock()); |
|
0 |
0 |
CHECK_FALSE(weak.lock()); |
|
0 |
0 |
CHECK_FALSE(weak.lock()); |
541
|
18 |
0 |
SECTION("use_count") { |
|
18 |
0 |
SECTION("use_count") { |
|
18 |
0 |
SECTION("use_count") { |
|
18 |
0 |
SECTION("use_count") { |
|
1 |
17 |
SECTION("use_count") { |
542
|
1 |
0 |
TestWP weak; |
543
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
0 |
0 |
CHECK(weak.use_count() == 0); |
|
0 |
0 |
CHECK(weak.use_count() == 0); |
544
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
0 |
0 |
CHECK(weak.weak_count() == 0); |
|
0 |
0 |
CHECK(weak.weak_count() == 0); |
546
|
1 |
0 |
TestSP obj = new Test; |
|
1 |
0 |
TestSP obj = new Test; |
547
|
1 |
0 |
weak = obj; |
548
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
0 |
0 |
CHECK(weak.use_count() == 1); |
|
0 |
0 |
CHECK(weak.use_count() == 1); |
549
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
0 |
0 |
CHECK(weak.weak_count() == 1); |
|
0 |
0 |
CHECK(weak.weak_count() == 1); |
551
|
1 |
0 |
TestWP w2 = weak; |
552
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
0 |
0 |
CHECK(weak.use_count() == 1); |
|
0 |
0 |
CHECK(weak.use_count() == 1); |
553
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
0 |
0 |
CHECK(weak.weak_count() == 2); |
|
0 |
0 |
CHECK(weak.weak_count() == 2); |
556
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
1 |
0 |
CHECK(weak.use_count() == 0); |
|
0 |
0 |
CHECK(weak.use_count() == 0); |
|
0 |
0 |
CHECK(weak.use_count() == 0); |
557
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
1 |
0 |
CHECK(weak.weak_count() == 2); |
|
0 |
0 |
CHECK(weak.weak_count() == 2); |
|
0 |
0 |
CHECK(weak.weak_count() == 2); |
560
|
18 |
0 |
SECTION("weak generalization") { |
|
18 |
0 |
SECTION("weak generalization") { |
|
18 |
0 |
SECTION("weak generalization") { |
|
18 |
0 |
SECTION("weak generalization") { |
|
1 |
17 |
SECTION("weak generalization") { |
561
|
1 |
0 |
TestSP obj = new Test; |
|
1 |
0 |
TestSP obj = new Test; |
562
|
1 |
0 |
panda::weak weak = obj; |
563
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
1 |
0 |
CHECK(weak.use_count() == 1); |
|
0 |
0 |
CHECK(weak.use_count() == 1); |
|
0 |
0 |
CHECK(weak.use_count() == 1); |
564
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
1 |
0 |
CHECK(weak.weak_count() == 1); |
|
0 |
0 |
CHECK(weak.weak_count() == 1); |
|
0 |
0 |
CHECK(weak.weak_count() == 1); |
567
|
1 |
0 |
weak = panda::weak(TestWP()); |
|
1 |
0 |
weak = panda::weak(TestWP()); |
568
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
0 |
0 |
CHECK(weak.weak_count() == 0); |
|
0 |
0 |
CHECK(weak.weak_count() == 0); |
570
|
1 |
0 |
weak = TestWP(); |
|
1 |
0 |
weak = TestWP(); |
571
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
1 |
0 |
CHECK(weak.weak_count() == 0); |
|
0 |
0 |
CHECK(weak.weak_count() == 0); |
|
0 |
0 |
CHECK(weak.weak_count() == 0); |
574
|
18 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
|
18 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
|
18 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
|
18 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
|
18 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == Tracer::ctor_total()); |
577
|
46 |
0 |
SECTION("Refcntd") { |
|
46 |
0 |
SECTION("Refcntd") { |
|
46 |
0 |
SECTION("Refcntd") { |
|
46 |
0 |
SECTION("Refcntd") { |
|
2 |
44 |
SECTION("Refcntd") { |
578
|
2 |
0 |
SECTION("on_delete") { |
|
2 |
0 |
SECTION("on_delete") { |
|
2 |
0 |
SECTION("on_delete") { |
|
2 |
0 |
SECTION("on_delete") { |
|
1 |
1 |
SECTION("on_delete") { |
579
|
1 |
0 |
TestDelSP obj = new TestDel(); |
|
1 |
0 |
TestDelSP obj = new TestDel(); |
581
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::ctor_calls == 1); |
582
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 1); |
583
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
0 |
0 |
CHECK(on_delete_calls == 1); |
|
0 |
0 |
CHECK(on_delete_calls == 1); |
585
|
2 |
0 |
SECTION("resurect") { |
|
2 |
0 |
SECTION("resurect") { |
|
2 |
0 |
SECTION("resurect") { |
|
2 |
0 |
SECTION("resurect") { |
|
1 |
1 |
SECTION("resurect") { |
586
|
1 |
0 |
auto ptr = new TestRes(); |
|
1 |
0 |
auto ptr = new TestRes(); |
589
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::ctor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::ctor_calls == 1); |
590
|
1 |
0 |
CHECK(Tracer::dtor_calls == 0); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 0); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 0); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 0); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 0); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 0); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 0); |
591
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
1 |
0 |
CHECK(on_delete_calls == 1); |
|
0 |
0 |
CHECK(on_delete_calls == 1); |
|
0 |
0 |
CHECK(on_delete_calls == 1); |
594
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
1 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 1); |
|
0 |
0 |
CHECK(Tracer::dtor_calls == 1); |
595
|
1 |
0 |
CHECK(on_delete_calls == 2); |
|
1 |
0 |
CHECK(on_delete_calls == 2); |
|
1 |
0 |
CHECK(on_delete_calls == 2); |
|
1 |
0 |
CHECK(on_delete_calls == 2); |
|
1 |
0 |
CHECK(on_delete_calls == 2); |
|
0 |
0 |
CHECK(on_delete_calls == 2); |
|
0 |
0 |
CHECK(on_delete_calls == 2); |
599
|
46 |
0 |
SECTION("compiles") { |
|
46 |
0 |
SECTION("compiles") { |
|
46 |
0 |
SECTION("compiles") { |
|
46 |
0 |
SECTION("compiles") { |
|
1 |
45 |
SECTION("compiles") { |
600
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
0 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
0 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
601
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
|
0 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
|
0 |
0 |
REQUIRE(foo(iptr(nullptr)) == 20); |
602
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
1 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
0 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
|
0 |
0 |
REQUIRE(foo(iptr(nullptr)) == 10); |
604
|
18 |
0 |
} |
|
18 |
0 |
} |