X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-func.c;h=476e04dd9ef5647bf950577053b9a33a98e83aff;hb=c8acf2dc429c96793cbb3fca726c45b6ad309944;hp=3c2de3cf7e79ab4ae02b6b31aa759917360bc5c8;hpb=5305c1498fa64397bc08134a58152ffb8c13fe1a;p=gnulib.git diff --git a/tests/test-func.c b/tests/test-func.c index 3c2de3cf7..476e04dd9 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-2010 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,8 +33,8 @@ main () ASSERT (strlen (__func__) + 1 == sizeof __func__); #endif - assert (strcmp (__func__, "main") == 0 - || strcmp (__func__, "") == 0); + ASSERT (strcmp (__func__, "main") == 0 + || strcmp (__func__, "") == 0); return 0; }