mirror of
https://github.com/boostorg/smart_ptr.git
synced 2026-02-03 22:05:04 +01:00
Fix smart_ptr tests to not require RTTI.
[SVN r58123]
This commit is contained in:
@@ -2462,6 +2462,8 @@ void test()
|
||||
|
||||
} // namespace n_const_cast
|
||||
|
||||
#if !defined( BOOST_NO_RTTI )
|
||||
|
||||
namespace n_dynamic_cast
|
||||
{
|
||||
|
||||
@@ -2527,6 +2529,8 @@ void test()
|
||||
|
||||
} // namespace n_dynamic_cast
|
||||
|
||||
#endif
|
||||
|
||||
namespace n_map
|
||||
{
|
||||
|
||||
@@ -3200,10 +3204,12 @@ void test()
|
||||
BOOST_TEST(px.get() != 0);
|
||||
BOOST_TEST(py.use_count() == 2);
|
||||
|
||||
#if !defined( BOOST_NO_RTTI )
|
||||
boost::shared_ptr<Y> py2 = boost::dynamic_pointer_cast<Y>(px);
|
||||
BOOST_TEST(py.get() == py2.get());
|
||||
BOOST_TEST(!(py < py2 || py2 < py));
|
||||
BOOST_TEST(py.use_count() == 3);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace n_spt_shared_from_this
|
||||
@@ -3229,7 +3235,9 @@ int main()
|
||||
n_comparison::test();
|
||||
n_static_cast::test();
|
||||
n_const_cast::test();
|
||||
#if !defined( BOOST_NO_RTTI )
|
||||
n_dynamic_cast::test();
|
||||
#endif
|
||||
|
||||
n_map::test();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user