X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-freadptr2.c;h=cec011c5fe4bbfd8d82e1736b85e2a7eacb760c6;hb=6d273bef42e648ae9bd1d60923d2a4c8fc5dca94;hp=59a2593f7b4a008fc8798e4b102c34028c67d743;hpb=03400ebfaa064922caf3767d6641d7e1cdc8cd1b;p=gnulib.git diff --git a/tests/test-freadptr2.c b/tests/test-freadptr2.c index 59a2593f7..cec011c5f 100644 --- a/tests/test-freadptr2.c +++ b/tests/test-freadptr2.c @@ -1,5 +1,5 @@ /* Test of freadptr() function. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2010 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 @@ -24,16 +24,7 @@ #include #include -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" static int freadptrbufsize (FILE *fp) @@ -59,12 +50,12 @@ main (int argc, char **argv) else { if (lseek (0, 0, SEEK_CUR) == nbytes) - /* An unbuffered stdio, such as BeOS or on uClibc compiled without - __STDIO_BUFFERS. */ - ASSERT (freadptrbufsize (stdin) == 0); + /* An unbuffered stdio, such as BeOS or on uClibc compiled without + __STDIO_BUFFERS. */ + ASSERT (freadptrbufsize (stdin) == 0); else - /* Normal buffered stdio. */ - ASSERT (freadptrbufsize (stdin) != 0); + /* Normal buffered stdio. */ + ASSERT (freadptrbufsize (stdin) != 0); } return 0;