X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-random_r.c;h=1a1fa44a9c87f5fd1860493a11c485c3edf92ab3;hb=af95cd82312c495ebe5336adf88c882ca7c0fc7f;hp=5308f7337224b5d5f37dfd48d91762965a568574;hpb=26af642c3723839ffecc86139959434d4957e94e;p=gnulib.git
diff --git a/tests/test-random_r.c b/tests/test-random_r.c
index 5308f7337..1a1fa44a9 100644
--- a/tests/test-random_r.c
+++ b/tests/test-random_r.c
@@ -1,5 +1,5 @@
/* Test random_r.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-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
@@ -15,21 +15,19 @@
along with this program. If not, see . */
#include
+
#include
-#include
+
+#include "signature.h"
+SIGNATURE_CHECK (srandom_r, int, (unsigned int, struct random_data *));
+SIGNATURE_CHECK (initstate_r, int, (unsigned int, char *, size_t,
+ struct random_data *));
+SIGNATURE_CHECK (setstate_r, int, (char *, struct random_data *));
+SIGNATURE_CHECK (random_r, int, (struct random_data *, int32_t *));
+
#include
-#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 ()
@@ -48,7 +46,7 @@ main ()
ASSERT (random_r (&rand_state, &r) == 0);
ASSERT (0 <= r);
if (RAND_MAX / 2 < r)
- ++n_big;
+ ++n_big;
}
/* Fail if none of the numbers were larger than RAND_MAX / 2. */