Blame src/regression/lrand48-signextend.c
|
Szabolcs Nagy |
7d3502 |
// lrand48 should give deterministic results
|
|
Szabolcs Nagy |
4bb249 |
#define _XOPEN_SOURCE 700
|
|
Szabolcs Nagy |
7d3502 |
#include <stdlib.h>
|
|
Szabolcs Nagy |
7d3502 |
#include "test.h"
|
|
Szabolcs Nagy |
7d3502 |
|
|
Szabolcs Nagy |
7d3502 |
int main(void)
|
|
Szabolcs Nagy |
7d3502 |
{
|
|
Szabolcs Nagy |
7d3502 |
long r;
|
|
Szabolcs Nagy |
7d3502 |
r = lrand48();
|
|
Szabolcs Nagy |
7d3502 |
if (r != 0) t_error("1st lrand48() got %ld want 0\n", r);
|
|
Szabolcs Nagy |
7d3502 |
r = lrand48();
|
|
Szabolcs Nagy |
7d3502 |
if (r != 2116118) t_error("2nd lrand48() got %ld want 2116118\n", r);
|
|
Szabolcs Nagy |
7d3502 |
r = lrand48();
|
|
Szabolcs Nagy |
7d3502 |
if (r != 89401895) t_error("3rd lrand48() got %ld want 89401895\n", r);
|
|
Szabolcs Nagy |
7d3502 |
return t_status;
|
|
Szabolcs Nagy |
7d3502 |
}
|