X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-array_oset.c;h=a7d1f001da7689156d832b8d070442f9879fb695;hb=a7ebfd1caaa58b6a7bc0b1d1510b0255604e804a;hp=c114c86ca7aa6f5c8b638d88a4cd220cbcf0b75a;hpb=99f430a8044e80894705b9a158e56258e41d7993;p=gnulib.git diff --git a/tests/test-array_oset.c b/tests/test-array_oset.c index c114c86ca..a7d1f001d 100644 --- a/tests/test-array_oset.c +++ b/tests/test-array_oset.c @@ -22,6 +22,7 @@ #include "gl_array_oset.h" +#include #include #include @@ -35,7 +36,16 @@ static const char *objects[30] = }; #define SIZEOF(array) (sizeof (array) / sizeof (array[0])) -#define ASSERT(condition) if (!(condition)) abort () +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) #define RANDOM(n) (rand () % (n)) #define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))] @@ -91,7 +101,7 @@ main (int argc, char *argv[]) set1 = gl_oset_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL); /* Create set2. */ - set2 = gl_list_create_empty (GL_ARRAY_LIST, NULL, NULL, false); + set2 = gl_list_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, false); check_all (set1, set2);