From: Benjamin Kosnik Date: Mon, 5 May 2008 17:16:44 +0000 (+0000) Subject: typedefs-1.cc: Correct requirements. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce72d1aa87e92f05b076bbfe57024918380904cc;p=gcc.git typedefs-1.cc: Correct requirements. 2008-05-05 Benjamin Kosnik * 20_util/make_signed/requirements/typedefs-1.cc: Correct requirements. * 20_util/make_unsigned/requirements/typedefs-1.cc: Same. From-SVN: r134948 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3ceb05a10b4..864a580fcd2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2008-05-05 Benjamin Kosnik + + * 20_util/make_signed/requirements/typedefs-1.cc: Correct requirements. + * 20_util/make_unsigned/requirements/typedefs-1.cc: Same. + 2008-05-01 Benjamin Kosnik * include/bits/c++config: Revert _GLIBCXX_LONG_DOUBLE_COMPAT change. diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc index 0dea4ca073b..519eb4762f1 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-1.cc @@ -2,7 +2,7 @@ // 2007-05-03 Benjamin Kosnik // -// Copyright (C) 2007 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,6 +30,7 @@ void test01() bool test __attribute__((unused)) = true; using std::make_signed; using std::is_same; + using std::is_signed; // Positive tests. typedef make_signed::type test2_type; @@ -52,8 +53,10 @@ void test01() VERIFY( (is_same::value) ); #endif + // Chapter 48, chapter 20. Smallest rank such that new signed type same size. typedef make_signed::type test25_type; - VERIFY( (is_same::value) ); + VERIFY( is_signed::value ); + VERIFY( sizeof(test25_type) == sizeof(test_enum) ); } int main() diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc index ead941c645b..8e774f43eb5 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-1.cc @@ -2,7 +2,7 @@ // 2007-05-03 Benjamin Kosnik // -// Copyright (C) 2007 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -30,6 +30,7 @@ void test01() bool test __attribute__((unused)) = true; using std::make_unsigned; using std::is_same; + using std::is_unsigned; // Positive tests. typedef make_unsigned::type test2_type; @@ -52,8 +53,11 @@ void test01() VERIFY( (is_same::value) ); #endif + // Chapter 48, chapter 20. Smallest rank such that new unsigned type + // same size. typedef make_unsigned::type test25_type; - VERIFY( (is_same::value) ); + VERIFY( is_unsigned::value ); + VERIFY( sizeof(test25_type) == sizeof(test_enum) ); } int main()