mirror of
https://github.com/boostorg/openmethod.git
synced 2026-02-01 20:52:10 +00:00
more coverity fixes
This commit is contained in:
@@ -116,9 +116,9 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(
|
||||
unique_virtual_ptr<Dog, Registry> p(std::make_unique<Dog>());
|
||||
auto dog = p.get();
|
||||
unique_virtual_ptr<Dog, Registry> q(std::move(p));
|
||||
// coverity[use_after_move]
|
||||
BOOST_TEST(q.get() == dog);
|
||||
BOOST_TEST(q.vptr() == Registry::template static_vptr<Dog>);
|
||||
// coverity[use_after_move]
|
||||
BOOST_TEST(p.get() == nullptr);
|
||||
BOOST_TEST(p.vptr() == nullptr);
|
||||
}
|
||||
@@ -128,9 +128,9 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(
|
||||
unique_virtual_ptr<Dog, Registry> p(std::make_unique<Dog>());
|
||||
auto dog = p.get();
|
||||
unique_virtual_ptr<Animal, Registry> q(std::move(p));
|
||||
// coverity[use_after_move]
|
||||
BOOST_TEST(q.get() == dog);
|
||||
BOOST_TEST(q.vptr() == Registry::template static_vptr<Dog>);
|
||||
// coverity[use_after_move]
|
||||
BOOST_TEST(p.get() == nullptr);
|
||||
BOOST_TEST(p.vptr() == nullptr);
|
||||
}
|
||||
@@ -271,6 +271,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(
|
||||
unique_virtual_ptr<Class>>(std::move(base));
|
||||
BOOST_TEST(derived.get() == p);
|
||||
BOOST_TEST(derived.vptr() == default_registry::static_vptr<Class>);
|
||||
// coverity[use_after_move]
|
||||
BOOST_TEST(base.get() == nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user