~donmcc/lrnd

lrnd/lrnd_tests.c -rw-r--r-- 387 bytes
fd8d136bDon McCaughey Created initial project skeleton. 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <assert.h>
#include <stdlib.h>
#include "lrnd.h"


static void
test_next_value_for_stdlib_rand(void)
{
    uint32_t value = UINT32_MAX;
    bool result = lrnd_next_value(lrnd_stdlib_rand, &value);
    assert(result);
    assert(value >= 0);
    assert(value <= RAND_MAX);
}


int
main(int argc, char *argv[])
{
    test_next_value_for_stdlib_rand();
    return EXIT_SUCCESS;
}