diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:30:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:32:57 +0900 |
commit | 71d216b90256936a9638f325af9bc69d720e75de (patch) | |
tree | 9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /libs/config/test | |
parent | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff) | |
download | boost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2 boost-71d216b90256936a9638f325af9bc69d720e75de.zip |
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'libs/config/test')
-rw-r--r-- | libs/config/test/Jamfile.v2 | 39 | ||||
-rw-r--r-- | libs/config/test/all/Jamfile.v2 | 7 | ||||
-rw-r--r-- | libs/config/test/boost_no_constexpr.ipp | 33 | ||||
-rw-r--r-- | libs/config/test/boost_no_cxx11_hdr_codecvt.ipp | 4 | ||||
-rw-r--r-- | libs/config/test/boost_no_cxx14_digit_separator.ipp | 2 | ||||
-rw-r--r-- | libs/config/test/boost_no_cxx14_hdr_shared_mutex.ipp | 27 | ||||
-rw-r--r-- | libs/config/test/config_info.cpp | 2 | ||||
-rw-r--r-- | libs/config/test/config_test.cpp | 16 | ||||
-rw-r--r-- | libs/config/test/no_cxx14_digit_separator_fail.cpp | 2 | ||||
-rw-r--r-- | libs/config/test/no_cxx14_digit_separator_pass.cpp | 4 | ||||
-rw-r--r-- | libs/config/test/no_cxx14_hdr_shared_mutex_fail.cpp | 37 | ||||
-rw-r--r-- | libs/config/test/no_cxx14_hdr_shared_mutex_pass.cpp | 37 |
12 files changed, 183 insertions, 27 deletions
diff --git a/libs/config/test/Jamfile.v2 b/libs/config/test/Jamfile.v2 index 05d27df8b6..f0ee88da4f 100644 --- a/libs/config/test/Jamfile.v2 +++ b/libs/config/test/Jamfile.v2 @@ -19,16 +19,16 @@ import ../checks/config : requires ; local is_unix = [ modules.peek : UNIX ] ; -if $(is_unix) -{ - local osname = [ SHELL uname ] ; +lib atomic ; +lib pthread ; +lib rt ; - switch $(osname) - { - case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ; - case "*BSD*" : OTHERFLAGS = "-lpthread" ; - } -} +exe has_atomic_lib : config_info.cpp atomic ; +explicit has_atomic_lib ; +exe has_pthread_lib : config_info.cpp pthread ; +explicit has_pthread_lib ; +exe has_rt_lib : config_info.cpp rt ; +explicit has_rt_lib ; test-suite config : @@ -38,6 +38,9 @@ test-suite config : #input-files : #requirements <threading>multi + [ check-target-builds has_atomic_lib : <source>atomic ] + [ check-target-builds has_pthread_lib : <source>pthread ] + [ check-target-builds has_rt_lib : <source>rt ] : config_test_threaded ] [ run config_test.cpp @@ -45,18 +48,18 @@ test-suite config : #input-files : #requirements <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static - <target-os>linux:<linkflags>-lpthread - <target-os>linux:<linkflags>-lrt - <toolset>gcc:<linkflags>$(OTHERFLAGS) + [ check-target-builds has_atomic_lib : <source>atomic ] + [ check-target-builds has_pthread_lib : <source>pthread ] + [ check-target-builds has_rt_lib : <source>rt ] ] [ run config_test.cpp : #args : #input-files : #requirements <rtti>off - <target-os>linux:<linkflags>-lpthread - <target-os>linux:<linkflags>-lrt - <toolset>gcc:<linkflags>$(OTHERFLAGS) + [ check-target-builds has_atomic_lib : <source>atomic ] + [ check-target-builds has_pthread_lib : <source>pthread ] + [ check-target-builds has_rt_lib : <source>rt ] : config_test_no_rtti ] [ run config_test.cpp @@ -64,9 +67,9 @@ test-suite config : #input-files : #requirements <exception-handling>off - <target-os>linux:<linkflags>-lpthread - <target-os>linux:<linkflags>-lrt - <toolset>gcc:<linkflags>$(OTHERFLAGS) + [ check-target-builds has_atomic_lib : <source>atomic ] + [ check-target-builds has_pthread_lib : <source>pthread ] + [ check-target-builds has_rt_lib : <source>rt ] : config_test_no_except ] [ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ] diff --git a/libs/config/test/all/Jamfile.v2 b/libs/config/test/all/Jamfile.v2 index fe83339779..1bca6e6b45 100644 --- a/libs/config/test/all/Jamfile.v2 +++ b/libs/config/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Mon Oct 13 13:09:12 2014 +# This file was automatically generated on Fri Jun 26 21:48:00 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -331,12 +331,15 @@ test-suite "BOOST_NO_CXX14_CONSTEXPR" : test-suite "BOOST_NO_CXX14_DECLTYPE_AUTO" : [ run ../no_cxx14_decltype_auto_pass.cpp ] [ compile-fail ../no_cxx14_decltype_auto_fail.cpp ] ; -test-suite "BOOST_NO_CXX14_DIGIT_SEPARATOR" : +test-suite "BOOST_NO_CXX14_DIGIT_SEPARATORS" : [ run ../no_cxx14_digit_separator_pass.cpp ] [ compile-fail ../no_cxx14_digit_separator_fail.cpp ] ; test-suite "BOOST_NO_CXX14_GENERIC_LAMBDAS" : [ run ../no_cxx14_generic_lambda_pass.cpp ] [ compile-fail ../no_cxx14_generic_lambda_fail.cpp ] ; +test-suite "BOOST_NO_CXX14_HDR_SHARED_MUTEX" : +[ run ../no_cxx14_hdr_shared_mutex_pass.cpp ] +[ compile-fail ../no_cxx14_hdr_shared_mutex_fail.cpp ] ; test-suite "BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES" : [ run ../no_cxx14_lambda_capture_pass.cpp ] [ compile-fail ../no_cxx14_lambda_capture_fail.cpp ] ; diff --git a/libs/config/test/boost_no_constexpr.ipp b/libs/config/test/boost_no_constexpr.ipp index 563bdb20c6..7b601379b5 100644 --- a/libs/config/test/boost_no_constexpr.ipp +++ b/libs/config/test/boost_no_constexpr.ipp @@ -36,10 +36,43 @@ constexpr const A a = 42; X<a> xx; // OK: unique conversion to int +// virtual function +struct B +{ + virtual void vf() {} +}; +struct C : B +{ + constexpr C() {} +}; + +// aggregate initialization +struct D +{ + int val[2]; + constexpr D() : val() {} +}; + +// virtual base +struct E +{ +}; +struct F : virtual E +{ +}; +constexpr F& f(F& out) { return out; } + int test() { int i = square(5); quiet_warning(i); + + switch (i) + { + case a: + break; + } + return 0; } diff --git a/libs/config/test/boost_no_cxx11_hdr_codecvt.ipp b/libs/config/test/boost_no_cxx11_hdr_codecvt.ipp index 37f91e5eb2..428fbb4e12 100644 --- a/libs/config/test/boost_no_cxx11_hdr_codecvt.ipp +++ b/libs/config/test/boost_no_cxx11_hdr_codecvt.ipp @@ -11,6 +11,7 @@ // DESCRIPTION: The standard library does not supply C++0x header <codecvt> #include <codecvt> +#include <locale> // for wstring_convert namespace boost_no_cxx11_hdr_codecvt { @@ -19,6 +20,9 @@ int test() using std::codecvt_utf8; using std::codecvt_utf16; using std::codecvt_utf8_utf16; +#ifndef BOOST_NO_CXX11_CHAR16_T + std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> test; +#endif return 0; } diff --git a/libs/config/test/boost_no_cxx14_digit_separator.ipp b/libs/config/test/boost_no_cxx14_digit_separator.ipp index 3bdbbf4307..ed4bcf2360 100644 --- a/libs/config/test/boost_no_cxx14_digit_separator.ipp +++ b/libs/config/test/boost_no_cxx14_digit_separator.ipp @@ -11,7 +11,7 @@ // TITLE: C++14 digit separator unavailable // DESCRIPTION: The compiler does not support C++14 digit separator -namespace boost_no_cxx14_digit_separator +namespace boost_no_cxx14_digit_separators { int test() diff --git a/libs/config/test/boost_no_cxx14_hdr_shared_mutex.ipp b/libs/config/test/boost_no_cxx14_hdr_shared_mutex.ipp new file mode 100644 index 0000000000..ceae565907 --- /dev/null +++ b/libs/config/test/boost_no_cxx14_hdr_shared_mutex.ipp @@ -0,0 +1,27 @@ +// (C) Copyright Edward Diener 2015 + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for more information. + +// MACRO: BOOST_NO_CXX14_HDR_SHARED_MUTEX +// TITLE: C++0y header <shared_mutex> unavailable +// DESCRIPTION: The standard library does not supply C++0y header <shared_mutex> + +#include <shared_mutex> + +namespace boost_no_cxx14_hdr_shared_mutex { + +int test() +{ + // + // We should probably test __cpp_lib_shared_timed_mutex here, but since neither + // MSVC/Dinkumware, nor clang/libc++ bother to set it (as of July 2015), there's + // not much point.... + using std::shared_timed_mutex; + return 0; +} + +} diff --git a/libs/config/test/config_info.cpp b/libs/config/test/config_info.cpp index b1fcf51657..b466c43c8c 100644 --- a/libs/config/test/config_info.cpp +++ b/libs/config/test/config_info.cpp @@ -1061,6 +1061,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_DECLTYPE_AUTO); PRINT_MACRO(BOOST_NO_CXX14_DIGIT_SEPARATORS); PRINT_MACRO(BOOST_NO_CXX14_GENERIC_LAMBDAS); + PRINT_MACRO(BOOST_NO_CXX14_HDR_SHARED_MUTEX); PRINT_MACRO(BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES); PRINT_MACRO(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION); PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); @@ -1123,6 +1124,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_USING_TEMPLATE); PRINT_MACRO(BOOST_NO_VOID_RETURNS); + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/libs/config/test/config_test.cpp b/libs/config/test/config_test.cpp index b266f4ebb0..3a3f5ba516 100644 --- a/libs/config/test/config_test.cpp +++ b/libs/config/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Mon Oct 13 13:09:12 2014 +// This file was automatically generated on Fri Jun 26 21:48:00 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -280,13 +280,18 @@ namespace boost_no_cxx14_decltype_auto = empty_boost; #ifndef BOOST_NO_CXX14_DIGIT_SEPARATORS #include "boost_no_cxx14_digit_separator.ipp" #else -namespace boost_no_cxx14_digit_separator = empty_boost; +namespace boost_no_cxx14_digit_separators = empty_boost; #endif #ifndef BOOST_NO_CXX14_GENERIC_LAMBDAS #include "boost_no_cxx14_generic_lambda.ipp" #else namespace boost_no_cxx14_generic_lambdas = empty_boost; #endif +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include "boost_no_cxx14_hdr_shared_mutex.ipp" +#else +namespace boost_no_cxx14_hdr_shared_mutex = empty_boost; +#endif #ifndef BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #include "boost_no_cxx14_lambda_capture.ipp" #else @@ -1501,7 +1506,7 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX14_DECLTYPE_AUTO at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } - if(0 != boost_no_cxx14_digit_separator::test()) + if(0 != boost_no_cxx14_digit_separators::test()) { std::cerr << "Failed test for BOOST_NO_CXX14_DIGIT_SEPARATORS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; @@ -1511,6 +1516,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX14_GENERIC_LAMBDAS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx14_hdr_shared_mutex::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX14_HDR_SHARED_MUTEX at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx14_initialized_lambda_captures::test()) { std::cerr << "Failed test for BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/libs/config/test/no_cxx14_digit_separator_fail.cpp b/libs/config/test/no_cxx14_digit_separator_fail.cpp index 8c0c06a101..59a3001839 100644 --- a/libs/config/test/no_cxx14_digit_separator_fail.cpp +++ b/libs/config/test/no_cxx14_digit_separator_fail.cpp @@ -32,6 +32,6 @@ int main( int, char *[] ) { - return boost_no_cxx14_digit_separator::test(); + return boost_no_cxx14_digit_separators::test(); } diff --git a/libs/config/test/no_cxx14_digit_separator_pass.cpp b/libs/config/test/no_cxx14_digit_separator_pass.cpp index bb88cd29db..a8814fe074 100644 --- a/libs/config/test/no_cxx14_digit_separator_pass.cpp +++ b/libs/config/test/no_cxx14_digit_separator_pass.cpp @@ -27,11 +27,11 @@ #ifndef BOOST_NO_CXX14_DIGIT_SEPARATORS #include "boost_no_cxx14_digit_separator.ipp" #else -namespace boost_no_cxx14_digit_separator = empty_boost; +namespace boost_no_cxx14_digit_separators = empty_boost; #endif int main( int, char *[] ) { - return boost_no_cxx14_digit_separator::test(); + return boost_no_cxx14_digit_separators::test(); } diff --git a/libs/config/test/no_cxx14_hdr_shared_mutex_fail.cpp b/libs/config/test/no_cxx14_hdr_shared_mutex_fail.cpp new file mode 100644 index 0000000000..11c93bbe17 --- /dev/null +++ b/libs/config/test/no_cxx14_hdr_shared_mutex_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jun 26 21:47:59 2015 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_NO_CXX14_HDR_SHARED_MUTEX +// This file should not compile, if it does then +// BOOST_NO_CXX14_HDR_SHARED_MUTEX should not be defined. +// See file boost_no_cxx14_hdr_shared_mutex.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include <boost/config.hpp> +#include "test.hpp" + +#ifdef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include "boost_no_cxx14_hdr_shared_mutex.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx14_hdr_shared_mutex::test(); +} + diff --git a/libs/config/test/no_cxx14_hdr_shared_mutex_pass.cpp b/libs/config/test/no_cxx14_hdr_shared_mutex_pass.cpp new file mode 100644 index 0000000000..20c5f7bbca --- /dev/null +++ b/libs/config/test/no_cxx14_hdr_shared_mutex_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jun 26 21:47:59 2015 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_NO_CXX14_HDR_SHARED_MUTEX +// This file should compile, if it does not then +// BOOST_NO_CXX14_HDR_SHARED_MUTEX should be defined. +// See file boost_no_cxx14_hdr_shared_mutex.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include <boost/config.hpp> +#include "test.hpp" + +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include "boost_no_cxx14_hdr_shared_mutex.ipp" +#else +namespace boost_no_cxx14_hdr_shared_mutex = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx14_hdr_shared_mutex::test(); +} + |