These are here instead of the type-specific test TUs, so that we only need to link to Boost.Container from one file.
| 51 | // test TUs, so that we only need to link to |
| 52 | // Boost.Container from one file. |
| 53 | void |
| 54 | testPmr() |
| 55 | { |
| 56 | // array |
| 57 | { |
| 58 | // get_allocator |
| 59 | { |
| 60 | monotonic_resource mr; |
| 61 | array a(&mr); |
| 62 | BOOST_TEST(a.get_allocator().resource() == &mr); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | // object |
| 67 | { |
| 68 | // get_allocator |
| 69 | { |
| 70 | monotonic_resource mr; |
| 71 | object o(&mr); |
| 72 | BOOST_TEST(o.get_allocator().resource() == &mr); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | // string |
| 77 | { |
| 78 | // get_allocator |
| 79 | { |
| 80 | monotonic_resource mr; |
| 81 | string s(&mr); |
| 82 | BOOST_TEST(s.get_allocator().resource() == &mr); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | // value |
| 87 | { |
| 88 | // get_allocator |
| 89 | { |
| 90 | monotonic_resource mr; |
| 91 | value jv(&mr); |
| 92 | BOOST_TEST(jv.get_allocator().resource() == &mr); |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void |
| 98 | run() |
nothing calls this directly
no test coverage detected