X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-i-ring.c;h=94f642b26a46358db566410c8e12e46f00efb747;hb=52357e723c251f4a4d8d5ce93790d7c88885cde6;hp=0e0691af3b1456026c0e1e6ea3e143db9eae5940;hpb=3b9556605613bd4346c02e0e75abd8f492aff44e;p=gnulib.git diff --git a/tests/test-i-ring.c b/tests/test-i-ring.c index 0e0691af3..94f642b26 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-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,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);