1 /* Check the values of __GMP_UINT_MAX etc.
3 Copyright 2001 Free Software Foundation, Inc.
5 This file is part of the GNU MP Library test suite.
7 The GNU MP Library test suite is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 3 of the License,
10 or (at your option) any later version.
12 The GNU MP Library test suite is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15 Public License for more details.
17 You should have received a copy of the GNU General Public License along with
18 the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
26 /* __GMP_UINT_MAX etc are generated with expressions in gmp.h since we don't
27 want to demand <limits.h> or forcibly include it. Check the expressions
28 come out the same as <limits.h>. */
31 main (int argc, char *argv[])
36 if (__GMP_UINT_MAX != UINT_MAX)
38 printf ("__GMP_UINT_MAX incorrect\n");
39 printf (" __GMP_UINT_MAX %u 0x%X\n", __GMP_UINT_MAX, __GMP_UINT_MAX);
40 printf (" UINT_MAX %u 0x%X\n", UINT_MAX, UINT_MAX);
46 if (__GMP_ULONG_MAX != ULONG_MAX)
48 printf ("__GMP_ULONG_MAX incorrect\n");
49 printf (" __GMP_ULONG_MAX %lu 0x%lX\n", __GMP_ULONG_MAX, __GMP_ULONG_MAX);
50 printf (" ULONG_MAX %lu 0x%lX\n", ULONG_MAX, ULONG_MAX);
56 if (__GMP_USHRT_MAX != USHRT_MAX)
58 printf ("__GMP_USHRT_MAX incorrect\n");
59 printf (" __GMP_USHRT_MAX %u 0x%X\n", __GMP_USHRT_MAX, __GMP_USHRT_MAX);
60 printf (" USHRT_MAX %u 0x%X\n", USHRT_MAX, USHRT_MAX);