X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-i-ring.c;h=7b7946b22e31fbdeea911a603c1e85a1bd811c02;hb=98f7f8fde92f6f3f583cabc1168305a9ce542bbe;hp=0e0691af3b1456026c0e1e6ea3e143db9eae5940;hpb=3b9556605613bd4346c02e0e75abd8f492aff44e;p=gnulib.git diff --git a/tests/test-i-ring.c b/tests/test-i-ring.c index 0e0691af3..7b7946b22 100644 --- a/tests/test-i-ring.c +++ b/tests/test-i-ring.c @@ -1,5 +1,5 @@ /* Test the simple ring buffer. - Copyright (C) 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2006-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 @@ -20,26 +20,15 @@ #include "i-ring.h" -#include -#include - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" int -main () +main (void) { + int o; I_ring ir; i_ring_init (&ir, -1); - int o = i_ring_push (&ir, 1); + o = i_ring_push (&ir, 1); ASSERT (o == -1); o = i_ring_push (&ir, 2); ASSERT (o == -1);