MCPcopy Create free account
hub / github.com/boostorg/json / testPull182

Method testPull182

test/storage_ptr.cpp:149–187  ·  view source on GitHub ↗

https://github.com/boostorg/json/pull/182

Source from the content-addressed store, hash-verified

147
148 // https://github.com/boostorg/json/pull/182
149 void
150 testPull182()
151 {
152 struct other
153 {
154 virtual void f() {}
155 };
156
157 struct my_resource
158 : other
159 , container::pmr::memory_resource
160 {
161 void*
162 do_allocate(
163 std::size_t,
164 std::size_t) override
165 {
166 return nullptr;
167 }
168
169 void
170 do_deallocate(
171 void*,
172 std::size_t,
173 std::size_t) noexcept override
174 {
175 }
176
177 bool
178 do_is_equal(
179 memory_resource const&) const noexcept override
180 {
181 return true;
182 }
183 };
184
185 my_resource mr;
186 BOOST_TEST(storage_ptr(&mr).get() == &mr);
187 }
188
189 void
190 testInitOrder()

Callers

nothing calls this directly

Calls 2

storage_ptrClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected