diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-02 10:30:51 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-02 10:30:51 +0100 |
commit | fd167a99e31b7021c78972c09acbf83b2d347c98 (patch) | |
tree | ca8ccd8fed78f99dd13ea6ab5069431983dac7b9 /tests/test-intprops.c | |
parent | 4d76768442551c97a85e6f133cb818d223012746 (diff) | |
parent | 44a3eaeba04ef78835ca741592c376428ada5f71 (diff) |
Update upstream source from tag 'upstream/0.9.8'
Update to upstream version '0.9.8'
with Debian dir bac53b09be895fe7915b59f95882628bcc7b606e
Diffstat (limited to 'tests/test-intprops.c')
-rw-r--r-- | tests/test-intprops.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/test-intprops.c b/tests/test-intprops.c index 0a8ddcd..629226a 100644 --- a/tests/test-intprops.c +++ b/tests/test-intprops.c @@ -1,5 +1,5 @@ /* Test intprops.h. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,7 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ @@ -43,7 +43,7 @@ and falls back on a dynamic assertion for other compilers. These tests should be checkable via 'verify' rather than 'ASSERT', but using 'verify' would run into a bug with HP-UX 11.23 cc; see - <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */ + <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */ #if __GNUC__ || __SUNPRO_C # define VERIFY(x) do { verify (x); } while (0) #else @@ -113,11 +113,32 @@ main (void) VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX); VERIFY (TYPE_MINIMUM (unsigned long int) == 0); VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX); + #ifdef LLONG_MAX + verify (TYPE_MINIMUM (long long int) == LLONG_MIN); + verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + #endif VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); VERIFY (TYPE_MINIMUM (uintmax_t) == 0); VERIFY (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); + /* TYPE_WIDTH. */ + #ifdef CHAR_WIDTH + verify (TYPE_WIDTH (char) == CHAR_WIDTH); + verify (TYPE_WIDTH (signed char) == SCHAR_WIDTH); + verify (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH); + verify (TYPE_WIDTH (short int) == SHRT_WIDTH); + verify (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH); + verify (TYPE_WIDTH (int) == INT_WIDTH); + verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); + verify (TYPE_WIDTH (long int) == LONG_WIDTH); + verify (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH); + #ifdef LLONG_WIDTH + verify (TYPE_WIDTH (long long int) == LLONG_WIDTH); + verify (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH); + #endif + #endif + /* INT_BITS_STRLEN_BOUND. */ VERIFY (INT_BITS_STRLEN_BOUND (1) == 1); VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789); |