MCPcopy Create free account
hub / github.com/boostorg/filesystem / test_move_construction_and_assignment

Function test_move_construction_and_assignment

test/path_unit_test.cpp:280–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278// test_move_construction_and_assignment -------------------------------------------//
279
280void 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

Callers 1

test_mainFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected