Update tests for make_shared and allocate_shared array forms, for normal case, initializer lists, variadic template arguments, for arrays and fixed size arrays.

[SVN r81299]
This commit is contained in:
Glen Fernandes
2012-11-11 19:14:50 +00:00
parent fa513340d7
commit 25e11b20d3
12 changed files with 375 additions and 41 deletions

View File

@@ -109,22 +109,6 @@ int main() {
BOOST_TEST(a1[0][1][0][0].f == 0);
BOOST_TEST(a1[1][0][0][0].i == 0);
}
#endif
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
{
boost::shared_ptr<int[]> a1 = boost::make_shared<int[]>({ 0, 1, 2, 3 });
BOOST_TEST(a1[0] == 0);
BOOST_TEST(a1[1] == 1);
BOOST_TEST(a1[2] == 2);
BOOST_TEST(a1[3] == 3);
}
{
boost::shared_ptr<int[4]> a1 = boost::make_shared<int[4]>({ 0, 1, 2, 3 });
BOOST_TEST(a1[0] == 0);
BOOST_TEST(a1[1] == 1);
BOOST_TEST(a1[2] == 2);
BOOST_TEST(a1[3] == 3);
}
#endif
return boost::report_errors();
}