X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=tests%2Ftest-ino-map.c;h=ef259715fcaea06b69d361d1ab88f605eecf6ce7;hb=64f62ee592856b418fa3e23c584796beac537af4;hp=12ad9f8666d4e60192a28930214a28999c31c70c;hpb=6f0680eb29a1737d704a1df26aafc00490cd34d8;p=gnulib.git diff --git a/tests/test-ino-map.c b/tests/test-ino-map.c index 12ad9f866..ef259715f 100644 --- a/tests/test-ino-map.c +++ b/tests/test-ino-map.c @@ -17,25 +17,11 @@ /* Written by Jim Meyering. */ #include -#include -#include -#include - -/* FIXME: once/if in gnulib, use #include "macros.h" in place of this */ -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) #include "ino-map.h" +#include "macros.h" + int main () { @@ -50,11 +36,13 @@ main () ASSERT (ino_map_insert (ino_map, 0) == INO_MAP_INIT + 2); ASSERT (ino_map_insert (ino_map, 0) == INO_MAP_INIT + 2); - int i; - for (i = 0; i < 100; i++) - { - ASSERT (ino_map_insert (ino_map, 10000 + i) == INO_MAP_INIT + 3 + i); - } + { + int i; + for (i = 0; i < 100; i++) + { + ASSERT (ino_map_insert (ino_map, 10000 + i) == INO_MAP_INIT + 3 + i); + } + } ino_map_free (ino_map);