|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81669 - trunk/libs/smart_ptr/test
From: glenfe_at_[hidden]
Date: 2012-12-02 05:17:07
Author: glenfe
Date: 2012-12-02 05:17:05 EST (Sun, 02 Dec 2012)
New Revision: 81669
URL: http://svn.boost.org/trac/boost/changeset/81669
Log:
Move two tests for allocate_shared and make_shared within check for BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
Text files modified:
trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp | 28 ++++++++++++++--------------
trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp | 29 ++++++++++++++---------------
2 files changed, 28 insertions(+), 29 deletions(-)
Modified: trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp (original)
+++ trunk/libs/smart_ptr/test/allocate_shared_arrays_create_test.cpp 2012-12-02 05:17:05 EST (Sun, 02 Dec 2012)
@@ -25,20 +25,6 @@
BOOST_TEST(a1[1][0] == 2);
BOOST_TEST(a1[1][1] == 3);
}
- {
- boost::shared_ptr<int[][2]> a1 = boost::allocate_shared<int[][2]>(std::allocator<int>(), 2, {0, 1});
- BOOST_TEST(a1[0][0] == 0);
- BOOST_TEST(a1[0][1] == 1);
- BOOST_TEST(a1[1][0] == 0);
- BOOST_TEST(a1[1][1] == 1);
- }
- {
- boost::shared_ptr<int[][2][2]> a1 = boost::allocate_shared<int[][2][2]>(std::allocator<int>(), 2, { {0, 1}, {2, 3} });
- BOOST_TEST(a1[0][0][0] == 0);
- BOOST_TEST(a1[0][0][1] == 1);
- BOOST_TEST(a1[1][1][0] == 2);
- BOOST_TEST(a1[1][1][1] == 3);
- }
#endif
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
{
@@ -56,6 +42,20 @@
BOOST_TEST(a1[1][1] == 3);
}
{
+ boost::shared_ptr<int[][2]> a1 = boost::allocate_shared<int[][2]>(std::allocator<int>(), 2, {0, 1});
+ BOOST_TEST(a1[0][0] == 0);
+ BOOST_TEST(a1[0][1] == 1);
+ BOOST_TEST(a1[1][0] == 0);
+ BOOST_TEST(a1[1][1] == 1);
+ }
+ {
+ boost::shared_ptr<int[][2][2]> a1 = boost::allocate_shared<int[][2][2]>(std::allocator<int>(), 2, { {0, 1}, {2, 3} });
+ BOOST_TEST(a1[0][0][0] == 0);
+ BOOST_TEST(a1[0][0][1] == 1);
+ BOOST_TEST(a1[1][1][0] == 2);
+ BOOST_TEST(a1[1][1][1] == 3);
+ }
+ {
boost::shared_ptr<int[2][2]> a1 = boost::allocate_shared<int[2][2]>(std::allocator<int>(), {0, 1});
BOOST_TEST(a1[0][0] == 0);
BOOST_TEST(a1[0][1] == 1);
Modified: trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp
==============================================================================
--- trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp (original)
+++ trunk/libs/smart_ptr/test/make_shared_arrays_create_test.cpp 2012-12-02 05:17:05 EST (Sun, 02 Dec 2012)
@@ -8,7 +8,6 @@
*/
#include <boost/detail/lightweight_test.hpp>
#include <boost/smart_ptr/make_shared_array.hpp>
-#include <string>
int main() {
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -26,20 +25,6 @@
BOOST_TEST(a1[1][0] == 2);
BOOST_TEST(a1[1][1] == 3);
}
- {
- boost::shared_ptr<int[][2]> a1 = boost::make_shared<int[][2]>(2, {0, 1});
- BOOST_TEST(a1[0][0] == 0);
- BOOST_TEST(a1[0][1] == 1);
- BOOST_TEST(a1[1][0] == 0);
- BOOST_TEST(a1[1][1] == 1);
- }
- {
- boost::shared_ptr<int[][2][2]> a1 = boost::make_shared<int[][2][2]>(2, { {0, 1}, {2, 3} });
- BOOST_TEST(a1[0][0][0] == 0);
- BOOST_TEST(a1[0][0][1] == 1);
- BOOST_TEST(a1[1][1][0] == 2);
- BOOST_TEST(a1[1][1][1] == 3);
- }
#endif
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
{
@@ -57,6 +42,20 @@
BOOST_TEST(a1[1][1] == 3);
}
{
+ boost::shared_ptr<int[][2]> a1 = boost::make_shared<int[][2]>(2, {0, 1});
+ BOOST_TEST(a1[0][0] == 0);
+ BOOST_TEST(a1[0][1] == 1);
+ BOOST_TEST(a1[1][0] == 0);
+ BOOST_TEST(a1[1][1] == 1);
+ }
+ {
+ boost::shared_ptr<int[][2][2]> a1 = boost::make_shared<int[][2][2]>(2, { {0, 1}, {2, 3} });
+ BOOST_TEST(a1[0][0][0] == 0);
+ BOOST_TEST(a1[0][0][1] == 1);
+ BOOST_TEST(a1[1][1][0] == 2);
+ BOOST_TEST(a1[1][1][1] == 3);
+ }
+ {
boost::shared_ptr<int[2][2]> a1 = boost::make_shared<int[2][2]>({ 0, 1 });
BOOST_TEST(a1[0][0] == 0);
BOOST_TEST(a1[0][1] == 1);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk