X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-areadlinkat.c;h=97a6215107c2f6788be8b1d72db73851098f09f9;hb=08c11765d4fe790403229496a8a3ec625a3ca5af;hp=6b0c96c77fd151775a709820c61e93cfa7433196;hpb=9d145640e828e0075ab4fa4567e243699ad64f06;p=gnulib.git diff --git a/tests/test-areadlinkat.c b/tests/test-areadlinkat.c index 6b0c96c77..97a621510 100644 --- a/tests/test-areadlinkat.c +++ b/tests/test-areadlinkat.c @@ -1,5 +1,5 @@ /* Tests of areadlinkat. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2011 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 @@ -29,17 +29,8 @@ #include #include -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "ignore-value.h" +#include "macros.h" #define BASE "test-areadlinkat.t" @@ -49,18 +40,18 @@ static int dfd = AT_FDCWD; /* Wrapper for testing areadlinkat. */ static char * -do_areadlinkat (char const *name, size_t ignored _UNUSED_PARAMETER_) +do_areadlinkat (char const *name, size_t ignored _GL_UNUSED) { return areadlinkat (dfd, name); } int -main () +main (void) { int result; /* Remove any leftovers from a previous partial run. */ - ASSERT (system ("rm -rf " BASE "*") == 0); + ignore_value (system ("rm -rf " BASE "*")); /* Basic tests. */ result = test_areadlink (do_areadlinkat, false); @@ -70,7 +61,7 @@ main () /* Relative tests. */ if (result == 77) - fputs ("skipping test: symlinks not supported on this filesystem\n", + fputs ("skipping test: symlinks not supported on this file system\n", stderr); else {