X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fopen.c;h=6488e85ee01b98b3fd045d9d19ec7440a6714ce1;hb=69770559f5bf198928150ac8162734d7f6b99c82;hp=337a389194f6b3e63a879ac5278cbdfca39631a5;hpb=955345ebebdae2b894b5a3d8e21036335cb13e5d;p=gnulib.git diff --git a/tests/test-fopen.c b/tests/test-fopen.c index 337a38919..6488e85ee 100644 --- a/tests/test-fopen.c +++ b/tests/test-fopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - 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 @@ -19,27 +19,16 @@ #include #include -#include - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) -int -main () -{ - ASSERT (fopen ("nonexist.ent/", "w") == NULL); - ASSERT (fopen ("/dev/null/", "r") == NULL); +#include "signature.h" +SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *)); + +#define BASE "test-fopen.t" - ASSERT (fopen ("/dev/null", "r") != NULL); +#include "test-fopen.h" - return 0; +int +main (void) +{ + return test_fopen (); }