X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-memcmp.c;h=479017940971ff3dab0cc8bc41d65e781af048d9;hb=09001dfb3ec39d237f8e248ff347cf1be3e6f0c1;hp=d108198f97d5eb0e35148006846700f036877364;hpb=bb051a0a3c0febe9d3fabb21ae5b7fcc2ae7aa10;p=gnulib.git diff --git a/tests/test-memcmp.c b/tests/test-memcmp.c index d108198f9..479017940 100644 --- a/tests/test-memcmp.c +++ b/tests/test-memcmp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2009 Free Software Foundation + * Copyright (C) 2008-2011 Free Software Foundation, Inc. * Written by Simon Josefsson * * This program is free software: you can redistribute it and/or modify @@ -19,22 +19,11 @@ #include -#include -#include +#include "signature.h" +SIGNATURE_CHECK (memcmp, int, (void const *, void const *, size_t)); #include "zerosize-ptr.h" - -#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) @@ -70,11 +59,11 @@ main (void) int i; for (i = 0; i < 4; i++) { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - ASSERT (memcmp (a, b, 16) < 0); + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + ASSERT (memcmp (a, b, 16) < 0); } }