michael@0: /* michael@0: * bbsrand.c michael@0: * michael@0: * Test driver for routines in bbs_rand.h michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #include "bbs_rand.h" michael@0: michael@0: #define NUM_TESTS 100 michael@0: michael@0: int main(void) michael@0: { michael@0: unsigned int seed, result, ix; michael@0: michael@0: seed = time(NULL); michael@0: bbs_srand((unsigned char *)&seed, sizeof(seed)); michael@0: michael@0: for(ix = 0; ix < NUM_TESTS; ix++) { michael@0: result = bbs_rand(); michael@0: michael@0: printf("Test %3u: %08X\n", ix + 1, result); michael@0: } michael@0: michael@0: return 0; michael@0: }