X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-func.c;h=07671040dcc88b967dd75cac312930b567ee349b;hb=d8f90adf5f01512958b6da46bd5eea01294a434e;hp=8a3c465e73f6a39abe83a3a0e9d731889ab85080;hpb=e2b97acafd3137d8cf3fc847a83e0946bd6203f2;p=gnulib.git diff --git a/tests/test-func.c b/tests/test-func.c index 8a3c465e7..07671040d 100644 --- a/tests/test-func.c +++ b/tests/test-func.c @@ -1,5 +1,5 @@ /* Test whether __func__ is available - Copyright (C) 2008-2009 Free Software Foundation, Inc. + Copyright (C) 2008-2012 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,20 +19,8 @@ #include #include -#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" int main () @@ -45,5 +33,8 @@ main () ASSERT (strlen (__func__) + 1 == sizeof __func__); #endif + ASSERT (strcmp (__func__, "main") == 0 + || strcmp (__func__, "") == 0); + return 0; }