ocarina/core/random.c
Anna Schumaker 068afd6276 core/random: Convert to C
And convert the unit test while we're at it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 10:05:58 -04:00

22 lines
279 B
C

/*
* Copyright 2014 (c) Anna Schumaker
*/
#ifdef CONFIG_TESTING
#include <core/random.h>
static unsigned int _random_value = 0;
void _seed_random(unsigned int n)
{
_random_value = n;
}
unsigned int _pick_random()
{
return ++_random_value;
}
#endif /* CONFIG_TESTING */