Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TEST_CASE("unique_ptr move self-assignment of non-empty") {
- int *raw_p = new int(10);
- unique_ptr<int> p(raw_p);
- p = std::move(p);
- REQUIRE(p.get() == raw_p); // NOLINT(bugprone-use-after-move)
- REQUIRE(p);
- CHECK(&*p == raw_p);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement