aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/testlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'mps/code/testlib.c')
-rw-r--r--mps/code/testlib.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mps/code/testlib.c b/mps/code/testlib.c
index 06d0641c688..be7284ea3fa 100644
--- a/mps/code/testlib.c
+++ b/mps/code/testlib.c
@@ -1,7 +1,7 @@
1/* testlib.c: TEST LIBRARY 1/* testlib.c: TEST LIBRARY
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 * Portions copyright (C) 2002 Global Graphics Software. 5 * Portions copyright (C) 2002 Global Graphics Software.
6 * 6 *
7 * .purpose: A library of functions that may be of use to unit tests. 7 * .purpose: A library of functions that may be of use to unit tests.
@@ -252,7 +252,7 @@ mps_addr_t rnd_addr(void)
252 * (New from 2010-03-22, changelist 170093) 252 * (New from 2010-03-22, changelist 170093)
253 */ 253 */
254 254
255void randomize(int argc, char **argv) 255void randomize(int argc, char *argv[])
256{ 256{
257 int i; 257 int i;
258 int n; 258 int n;
@@ -262,7 +262,8 @@ void randomize(int argc, char **argv)
262 if (argc > 1) { 262 if (argc > 1) {
263 n = sscanf(argv[1], "%lu", &seed0); 263 n = sscanf(argv[1], "%lu", &seed0);
264 Insist(n == 1); 264 Insist(n == 1);
265 printf("randomize(): resetting initial state (v3) to: %lu.\n", seed0); 265 printf("%s: randomize(): resetting initial state (v3) to: %lu.\n",
266 argv[0], seed0);
266 rnd_state_set(seed0); 267 rnd_state_set(seed0);
267 } else { 268 } else {
268 /* time_t uses an arbitrary encoding, but hopefully the low order */ 269 /* time_t uses an arbitrary encoding, but hopefully the low order */
@@ -288,7 +289,8 @@ void randomize(int argc, char **argv)
288 } 289 }
289 290
290 seed0 = rnd_state(); 291 seed0 = rnd_state();
291 printf("randomize(): choosing initial state (v3): %lu.\n", seed0); 292 printf("%s: randomize(): choosing initial state (v3): %lu.\n",
293 argv[0], seed0);
292 rnd_state_set(seed0); 294 rnd_state_set(seed0);
293 } 295 }
294} 296}
@@ -386,7 +388,7 @@ void cdie(int res, const char *s)
386 388
387/* C. COPYRIGHT AND LICENSE 389/* C. COPYRIGHT AND LICENSE
388 * 390 *
389 * Copyright (C) 2001-2002, 2008 Ravenbrook Limited <http://www.ravenbrook.com/>. 391 * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
390 * All rights reserved. This is an open source license. Contact 392 * All rights reserved. This is an open source license. Contact
391 * Ravenbrook for commercial licensing options. 393 * Ravenbrook for commercial licensing options.
392 * 394 *