X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-freadptr2.c;h=0b0e2384b0a38e39ec483ef94b230cd97cd72b4f;hb=533101a268dc5015a140ff4695d8eeb04fbe57b6;hp=c2922783b6a3bccb76271693fff4282dc1087459;hpb=e220635fc952c63b533873f2af39ec76aed4b4e3;p=gnulib.git diff --git a/tests/test-freadptr2.c b/tests/test-freadptr2.c index c2922783b..0b0e2384b 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-2013 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,17 +24,7 @@ #include #include -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" static int freadptrbufsize (FILE *fp) @@ -60,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;