From df93e6f193fbf8a746d43d785af2260211961f01 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Fri, 2 May 2008 14:52:56 +0000 Subject: * libc/include/stdint.h (SIZE_MIN): Remove. (SIZE_MAX): Define. * testsuite/newlib.stdlib/stdlib.exp: New. * testsuite/newlib.stdlib/size_max.c: Likewise. --- newlib/testsuite/newlib.stdlib/size_max.c | 18 ++++++++++++++++++ newlib/testsuite/newlib.stdlib/stdlib.exp | 10 ++++++++++ 2 files changed, 28 insertions(+) create mode 100644 newlib/testsuite/newlib.stdlib/size_max.c create mode 100644 newlib/testsuite/newlib.stdlib/stdlib.exp (limited to 'newlib/testsuite') diff --git a/newlib/testsuite/newlib.stdlib/size_max.c b/newlib/testsuite/newlib.stdlib/size_max.c new file mode 100644 index 0000000..d163e27 --- /dev/null +++ b/newlib/testsuite/newlib.stdlib/size_max.c @@ -0,0 +1,18 @@ +#include +#include +#include + +int main () { + size_t s; + + s = SIZE_MAX; + /* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is + too big. */ + if (s != SIZE_MAX) + abort (); + /* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough. */ + if (++s != 0) + abort (); + + return 0; +} diff --git a/newlib/testsuite/newlib.stdlib/stdlib.exp b/newlib/testsuite/newlib.stdlib/stdlib.exp new file mode 100644 index 0000000..670d21e --- /dev/null +++ b/newlib/testsuite/newlib.stdlib/stdlib.exp @@ -0,0 +1,10 @@ +# Copyright (C) 2008 by CodeSourcery, Inc. All rights reserved. +# +# Permission to use, copy, modify, and distribute this software +# is freely granted, provided that this notice is preserved. + +load_lib passfail.exp + +set exclude_list [list "atexit.c"] + +newlib_pass_fail_all -x $exclude_list -- cgit v1.1