diff --git a/test/make_unique_args_test.cpp b/test/make_unique_args_test.cpp index 769c887..6c13d41 100644 --- a/test/make_unique_args_test.cpp +++ b/test/make_unique_args_test.cpp @@ -6,6 +6,8 @@ * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ +#include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -40,7 +42,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) BOOST_TEST(type::instances == 0); { std::unique_ptr a1 = boost::make_unique(); @@ -132,8 +133,14 @@ int main() { a1.reset(); BOOST_TEST(type::instances == 0); } -#endif #endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_array_noinit_test.cpp b/test/make_unique_array_noinit_test.cpp index 7f85f24..edaa67f 100644 --- a/test/make_unique_array_noinit_test.cpp +++ b/test/make_unique_array_noinit_test.cpp @@ -7,6 +7,7 @@ * or copy at http://boost.org/LICENSE_1_0.txt) */ #include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -30,7 +31,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) { std::unique_ptr a1 = boost::make_unique_noinit(3); BOOST_TEST(a1.get() != 0); @@ -76,7 +76,13 @@ int main() { a1.reset(); BOOST_TEST(type::instances == 0); } -#endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_array_test.cpp b/test/make_unique_array_test.cpp index 21808af..8e5ea79 100644 --- a/test/make_unique_array_test.cpp +++ b/test/make_unique_array_test.cpp @@ -7,6 +7,7 @@ * or copy at http://boost.org/LICENSE_1_0.txt) */ #include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -30,7 +31,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) { std::unique_ptr a1 = boost::make_unique(3); BOOST_TEST(a1.get() != 0); @@ -100,7 +100,13 @@ int main() { a1.reset(); BOOST_TEST(type::instances == 0); } -#endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_array_throws_test.cpp b/test/make_unique_array_throws_test.cpp index dc48fa1..3efbc2a 100644 --- a/test/make_unique_array_throws_test.cpp +++ b/test/make_unique_array_throws_test.cpp @@ -7,6 +7,7 @@ * or copy at http://boost.org/LICENSE_1_0.txt) */ #include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -33,7 +34,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) BOOST_TEST(type::instances == 0); try { boost::make_unique(6); @@ -65,7 +65,13 @@ int main() { } catch (...) { BOOST_TEST(type::instances == 0); } -#endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_noinit_test.cpp b/test/make_unique_noinit_test.cpp index 66026ac..1ef0daa 100644 --- a/test/make_unique_noinit_test.cpp +++ b/test/make_unique_noinit_test.cpp @@ -6,6 +6,8 @@ * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ +#include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -29,7 +31,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) { std::unique_ptr a1 = boost::make_unique_noinit(); BOOST_TEST(a1.get() != 0); @@ -52,7 +53,13 @@ int main() { a1.reset(); BOOST_TEST(type::instances == 0); } -#endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_test.cpp b/test/make_unique_test.cpp index 6106ac3..ab13c33 100644 --- a/test/make_unique_test.cpp +++ b/test/make_unique_test.cpp @@ -6,6 +6,8 @@ * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ +#include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -29,7 +31,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) { std::unique_ptr a1 = boost::make_unique(); BOOST_TEST(a1.get() != 0); @@ -59,7 +60,13 @@ int main() { a1.reset(); BOOST_TEST(type::instances == 0); } -#endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_throws_test.cpp b/test/make_unique_throws_test.cpp index bf9e5bf..9594c90 100644 --- a/test/make_unique_throws_test.cpp +++ b/test/make_unique_throws_test.cpp @@ -6,6 +6,8 @@ * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ +#include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -32,7 +34,6 @@ private: unsigned int type::instances = 0; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) BOOST_TEST(type::instances == 0); try { boost::make_unique(); @@ -40,7 +41,13 @@ int main() { } catch (...) { BOOST_TEST(type::instances == 0); } -#endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif diff --git a/test/make_unique_value_test.cpp b/test/make_unique_value_test.cpp index 308d488..03cdf47 100644 --- a/test/make_unique_value_test.cpp +++ b/test/make_unique_value_test.cpp @@ -6,6 +6,8 @@ * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ +#include +#if !defined(BOOST_NO_CXX11_SMART_PTR) #include #include @@ -15,7 +17,6 @@ struct type { }; int main() { -#if !defined(BOOST_NO_CXX11_SMART_PTR) { std::unique_ptr a1 = boost::make_unique(); BOOST_TEST(a1.get() != 0); @@ -44,8 +45,14 @@ int main() { BOOST_TEST(a1->x == 1); BOOST_TEST(a1->y == 2); } -#endif #endif return boost::report_errors(); } +#else + +int main() { + return 0; +} + +#endif