diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-12-19 08:18:18 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-12-19 08:18:18 +0000 |
commit | 5bcba0ed52c291c1758a8daf24a7ed1680b0330f (patch) | |
tree | b9849ac2cc5f9b4be532e8763710e757afac1eee /stdlib/tst-rand48.c | |
parent | 9e1444fc3ddba6efabe467007c1e600f4571687c (diff) | |
download | glibc-5bcba0ed52c291c1758a8daf24a7ed1680b0330f.tar glibc-5bcba0ed52c291c1758a8daf24a7ed1680b0330f.tar.gz glibc-5bcba0ed52c291c1758a8daf24a7ed1680b0330f.tar.bz2 glibc-5bcba0ed52c291c1758a8daf24a7ed1680b0330f.zip |
[BZ #3747]
2006-12-18 Jakub Jelinek <jakub@redhat.com>
[BZ #3747]
* stdlib/jrand48_r.c (__jrand48_r): Make sure result is in the
[-231 .. 231) range.
* stdlib/tst-rand48.c (main): Fix expected values for 64-bit
targets.
* stdlib/tst-rand48-2.c: New test.
* stdlib/Makefile (tests): Add tst-rand48-2.
Diffstat (limited to 'stdlib/tst-rand48.c')
-rw-r--r-- | stdlib/tst-rand48.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/tst-rand48.c b/stdlib/tst-rand48.c index fd2c4c1955..52e1b96afe 100644 --- a/stdlib/tst-rand48.c +++ b/stdlib/tst-rand48.c @@ -44,10 +44,10 @@ main (void) } l = mrand48 (); - if (l != 0xa28c1003l) + if (l != -0x5d73effdl) { printf ("mrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0xa28c1003l, l); + __LINE__ - 4, -0x5d73effdl, l); result = 1; } @@ -60,10 +60,10 @@ main (void) } l = mrand48 (); - if (l != 0x9e88f474l) + if (l != -0x61770b8cl) { printf ("mrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0x9e88f474l, l); + __LINE__ - 4, -0x61770b8cl, l); result = 1; } @@ -92,10 +92,10 @@ main (void) } l = mrand48 (); - if (l != 0xeb7a1fa3l) + if (l != -0x1485e05dl) { printf ("mrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0xeb7a1fa3l, l); + __LINE__ - 4, -0x1485e05dl, l); result = 1; } @@ -171,10 +171,10 @@ main (void) } l = mrand48 (); - if (l != 0xa28c1003l) + if (l != -0x5d73effdl) { printf ("mrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0xa28c1003l, l); + __LINE__ - 4, -0x5d73effdl, l); result = 1; } @@ -187,10 +187,10 @@ main (void) } l = mrand48 (); - if (l != 0x9e88f474l) + if (l != -0x61770b8cl) { printf ("mrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0x9e88f474l, l); + __LINE__ - 4, -0x61770b8cl, l); result = 1; } @@ -231,10 +231,10 @@ main (void) } l = mrand48 (); - if (l != 0xeb7a1fa3l) + if (l != -0x1485e05dl) { printf ("mrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0xeb7a1fa3l, l); + __LINE__ - 4, -0x1485e05dl, l); result = 1; } @@ -287,10 +287,10 @@ main (void) } l = jrand48 (xs); - if (l != 0xf568c7a0l) + if (l != -0xa973860l) { printf ("jrand48() in line %d failed: expected %lx, seen %lx\n", - __LINE__ - 4, 0xf568c7a0l, l); + __LINE__ - 4, -0xa973860l, l); result = 1; } |