X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-unsetenv.c;h=9c9443b89f51345a5a6eb318b551d89ea44bb085;hb=48768ae733581a3bd2d2bd2050f0cfa728a51d91;hp=2815cf3a398a806d96bb53686192847613ebad52;hpb=91e21656de5ae1e87d23465ce46e738be45a7254;p=pspp diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c index 2815cf3a39..9c9443b89f 100644 --- a/tests/test-unsetenv.c +++ b/tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - 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 @@ -20,22 +20,14 @@ #include +#include "signature.h" +SIGNATURE_CHECK (unsetenv, int, (char const *)); + #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 (void) @@ -43,7 +35,7 @@ main (void) char entry[] = "b=2"; /* Test removal when multiple entries present. */ - ASSERT (putenv ("a=1") == 0); + ASSERT (putenv ((char *) "a=1") == 0); ASSERT (putenv (entry) == 0); entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */ ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */