| 69 | }; |
| 70 | |
| 71 | void |
| 72 | testMembers() |
| 73 | { |
| 74 | auto const dsp = storage_ptr{}; |
| 75 | auto const usp = |
| 76 | make_shared_resource<unique_resource>(); |
| 77 | |
| 78 | // ~storage_ptr() |
| 79 | { |
| 80 | // implied |
| 81 | } |
| 82 | |
| 83 | // storage_ptr() |
| 84 | { |
| 85 | storage_ptr sp; |
| 86 | BOOST_TEST(sp.get()); |
| 87 | } |
| 88 | |
| 89 | // storage_ptr(storage_ptr&&) |
| 90 | { |
| 91 | storage_ptr sp1 = dsp; |
| 92 | storage_ptr sp2(std::move(sp1)); |
| 93 | BOOST_TEST(sp1.get()); |
| 94 | BOOST_TEST(*sp2 == *dsp); |
| 95 | } |
| 96 | |
| 97 | // storage_ptr(storage_ptr const&) |
| 98 | { |
| 99 | storage_ptr sp1 = dsp; |
| 100 | storage_ptr sp2(sp1); |
| 101 | BOOST_TEST(sp1 == sp2); |
| 102 | } |
| 103 | |
| 104 | // operator=(storage_ptr&&) |
| 105 | { |
| 106 | storage_ptr sp1(dsp); |
| 107 | storage_ptr sp2(usp); |
| 108 | sp2 = std::move(sp1); |
| 109 | BOOST_TEST(*sp2 == *dsp); |
| 110 | } |
| 111 | |
| 112 | // operator=(storage_ptr const&) |
| 113 | { |
| 114 | storage_ptr sp1(dsp); |
| 115 | storage_ptr sp2(usp); |
| 116 | sp2 = sp1; |
| 117 | BOOST_TEST(*sp1 == *sp2); |
| 118 | } |
| 119 | |
| 120 | // get() |
| 121 | { |
| 122 | { |
| 123 | storage_ptr sp(dsp); |
| 124 | BOOST_TEST(sp.get() == dsp.get()); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | // operator->() |
nothing calls this directly
no test coverage detected