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

@@ -38,7 +38,21 @@ int main() {
}
BOOST_TEST(type::instances == 0);
try {
boost::shared_ptr<type[]> a1 = boost::make_shared_noinit<type[]>(6);
boost::make_shared<type[][2]>(3);
BOOST_ERROR("make_shared did not throw");
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::make_shared_noinit<type[]>(6);
BOOST_ERROR("make_shared_noinit did not throw");
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::make_shared_noinit<type[][2]>(3);
BOOST_ERROR("make_shared_noinit did not throw");
} catch (...) {
BOOST_TEST(type::instances == 0);