diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-06 23:08:41 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-06 23:08:41 +0000 |
commit | 439d14a0200386f8bcfced2f246b49b2aee5a091 (patch) | |
tree | c70b305b4a24df50c3c11b28165330651d8dba1c /libstdc++-v3/testsuite/20_util/is_compound/value.cc | |
parent | 5f0d54690319759c551839e66afc5b133ec4ca79 (diff) | |
download | gcc-439d14a0200386f8bcfced2f246b49b2aee5a091.tar.gz |
2013-12-06 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/util/testsuite_tr1.h (test_category, test_property,
test_relationship): constexpr in c++11 mode.
* testsuite/20_util/add_lvalue_reference/value.cc: Use static_assert
and change to dg-do compile testcase.
* testsuite/20_util/add_rvalue_reference/value.cc: Likewise.
* testsuite/20_util/aligned_storage/value.cc: Likewise.
* testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
* testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
* testsuite/20_util/has_trivial_default_constructor/value.cc: Likewise.
* testsuite/20_util/is_compound/value.cc: Likewise.
* testsuite/20_util/is_constructible/value.cc: Likewise.
* testsuite/20_util/is_convertible/value.cc: Likewise.
* testsuite/20_util/is_copy_assignable/value.cc: Likewise.
* testsuite/20_util/is_copy_constructible/value.cc: Likewise.
* testsuite/20_util/is_floating_point/value.cc: Likewise.
* testsuite/20_util/is_function/value.cc: Likewise.
* testsuite/20_util/is_fundamental/value.cc: Likewise.
* testsuite/20_util/is_integral/value.cc: Likewise.
* testsuite/20_util/is_literal_type/value.cc: Likewise.
* testsuite/20_util/is_lvalue_reference/value.cc: Likewise.
* testsuite/20_util/is_member_function_pointer/value.cc: Likewise.
* testsuite/20_util/is_member_object_pointer/value.cc: Likewise.
* testsuite/20_util/is_member_pointer/value.cc: Likewise.
* testsuite/20_util/is_move_assignable/value.cc: Likewise.
* testsuite/20_util/is_move_constructible/value.cc: Likewise.
* testsuite/20_util/is_nothrow_assignable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_constructible/value.cc: Likewise.
* testsuite/20_util/is_nothrow_copy_assignable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_copy_constructible/value.cc: Likewise.
* testsuite/20_util/is_nothrow_default_constructible/value.cc: Likewise.
* testsuite/20_util/is_nothrow_move_assignable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_move_constructible/value.cc: Likewise.
* testsuite/20_util/is_null_pointer/value.cc: Likewise.
* testsuite/20_util/is_object/value.cc: Likewise.
* testsuite/20_util/is_pod/value.cc: Likewise.
* testsuite/20_util/is_reference/value.cc: Likewise.
* testsuite/20_util/is_rvalue_reference/value.cc: Likewise.
* testsuite/20_util/is_scalar/value.cc: Likewise.
* testsuite/20_util/is_signed/value.cc: Likewise.
* testsuite/20_util/is_standard_layout/value.cc: Likewise.
* testsuite/20_util/is_trivial/value.cc: Likewise.
* testsuite/20_util/is_trivially_destructible/value.cc: Likewise.
* testsuite/20_util/is_unsigned/value.cc: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.
* testsuite/20_util/remove_reference/value.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/20_util/is_compound/value.cc')
-rw-r--r-- | libstdc++-v3/testsuite/20_util/is_compound/value.cc | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/libstdc++-v3/testsuite/20_util/is_compound/value.cc b/libstdc++-v3/testsuite/20_util/is_compound/value.cc index 936b7366663..ac04f55081f 100644 --- a/libstdc++-v3/testsuite/20_util/is_compound/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_compound/value.cc @@ -1,4 +1,5 @@ -// { dg-options "-std=gnu++0x" } +// { dg-options "-std=gnu++11" } +// { dg-do compile } // Copyright (C) 2011-2013 Free Software Foundation, Inc. // @@ -18,43 +19,35 @@ // <http://www.gnu.org/licenses/>. #include <type_traits> -#include <testsuite_hooks.h> #include <testsuite_tr1.h> void test01() { - bool test __attribute__((unused)) = true; using std::is_compound; using namespace __gnu_test; - - VERIFY( (test_category<is_compound, void>(false)) ); - VERIFY( (test_category<is_compound, char>(false)) ); - VERIFY( (test_category<is_compound, signed char>(false)) ); - VERIFY( (test_category<is_compound, unsigned char>(false)) ); + + static_assert(test_category<is_compound, void>(false), ""); + static_assert(test_category<is_compound, char>(false), ""); + static_assert(test_category<is_compound, signed char>(false), ""); + static_assert(test_category<is_compound, unsigned char>(false), ""); #ifdef _GLIBCXX_USE_WCHAR_T - VERIFY( (test_category<is_compound, wchar_t>(false)) ); + static_assert(test_category<is_compound, wchar_t>(false), ""); #endif - VERIFY( (test_category<is_compound, short>(false)) ); - VERIFY( (test_category<is_compound, unsigned short>(false)) ); - VERIFY( (test_category<is_compound, int>(false)) ); - VERIFY( (test_category<is_compound, unsigned int>(false)) ); - VERIFY( (test_category<is_compound, long>(false)) ); - VERIFY( (test_category<is_compound, unsigned long>(false)) ); - VERIFY( (test_category<is_compound, long long>(false)) ); - VERIFY( (test_category<is_compound, unsigned long long>(false)) ); - VERIFY( (test_category<is_compound, float>(false)) ); - VERIFY( (test_category<is_compound, double>(false)) ); - VERIFY( (test_category<is_compound, long double>(false)) ); + static_assert(test_category<is_compound, short>(false), ""); + static_assert(test_category<is_compound, unsigned short>(false), ""); + static_assert(test_category<is_compound, int>(false), ""); + static_assert(test_category<is_compound, unsigned int>(false), ""); + static_assert(test_category<is_compound, long>(false), ""); + static_assert(test_category<is_compound, unsigned long>(false), ""); + static_assert(test_category<is_compound, long long>(false), ""); + static_assert(test_category<is_compound, unsigned long long>(false), ""); + static_assert(test_category<is_compound, float>(false), ""); + static_assert(test_category<is_compound, double>(false), ""); + static_assert(test_category<is_compound, long double>(false), ""); // libstdc++/56609 - VERIFY( (test_category<is_compound, std::nullptr_t>(false)) ); + static_assert(test_category<is_compound, std::nullptr_t>(false), ""); // Sanity check. - VERIFY( (test_category<is_compound, ClassType>(true)) ); -} - -int main() -{ - test01(); - return 0; + static_assert(test_category<is_compound, ClassType>(true), ""); } |