| 278 | // test_move_construction_and_assignment -------------------------------------------// |
| 279 | |
| 280 | void test_move_construction_and_assignment() |
| 281 | { |
| 282 | std::cout << "testing move_construction_and_assignment..." << std::endl; |
| 283 | |
| 284 | path from("long enough to avoid small object optimization"); |
| 285 | path to(std::move(from)); |
| 286 | BOOST_TEST(to == "long enough to avoid small object optimization"); |
| 287 | if (!from.empty()) |
| 288 | cout << "Note: move construction did not result in empty source path" << endl; |
| 289 | |
| 290 | path from2("long enough to avoid small object optimization"); |
| 291 | path to2; |
| 292 | to2 = std::move(from2); |
| 293 | BOOST_TEST(to2 == "long enough to avoid small object optimization"); |
| 294 | if (!from2.empty()) |
| 295 | cout << "Note: move assignment did not result in empty rhs path" << endl; |
| 296 | } |
| 297 | |
| 298 | // test_appends --------------------------------------------------------------------// |
| 299 | |