From: Jim Meyering Date: Tue, 8 Feb 2011 07:25:46 +0000 (+0100) Subject: tests: randread-tests: use macro.h not "#define ASSERT..." X-Git-Tag: v8.11~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=480c0dc9e7c1890b11797c0e7704bd0e2e9821b7;p=thirdparty%2Fcoreutils.git tests: randread-tests: use macro.h not "#define ASSERT..." * gl/modules/randread-tests (Files): Add tests/macros.h * gl/tests/test-rand-isaac.c: Remove now-unneeded #include directives. (ASSERT): Remove definition. Instead, include "macros.h". Prompted by suggestions from Bruno Haible. --- diff --git a/gl/modules/randread-tests b/gl/modules/randread-tests index b608ac67a1..af24c90414 100644 --- a/gl/modules/randread-tests +++ b/gl/modules/randread-tests @@ -1,5 +1,6 @@ Files: tests/test-rand-isaac.c +tests/macros.h Depends-on: diff --git a/gl/tests/test-rand-isaac.c b/gl/tests/test-rand-isaac.c index 83cd6bc36c..9dd7e2f1a7 100644 --- a/gl/tests/test-rand-isaac.c +++ b/gl/tests/test-rand-isaac.c @@ -23,22 +23,9 @@ #include #include -#include -#include #include -/* FIXME: once/if in gnulib, use #include "macros.h" in place of this */ -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" /* This expected output was generated by running the programs in , as last modified