Go to the documentation of this file.
18 #ifndef __LIBTEST_TESTDATA_H
19 #define __LIBTEST_TESTDATA_H
30 #include <FreeNOS/System.h>
70 unsigned int seed = pid;
C void srandom(unsigned int new_seed)
Random number generator.
T & get(Size index)
Retrieve previously random generated test data by index.
u64 timestamp()
Reads the CPU's timestamp counter.
Generate test data for a certain data type.
uint tv_usec
Microseconds.
pid_t getpid()
Get the process ID.
Size count() const
The number of generated values.
int gettimeofday(struct timeval *tv, struct timezone *tz)
Get current time of day.
Vector< T > m_values
Vector with generated values.
#define NULL
NULL means zero.
unsigned int Size
Any sane size indicator cannot go negative.
void seed()
Initialize the random number generator.
T & operator[](Size index)
Retrieve previously random generated test data by index.
virtual ~TestData()
Destructor.
virtual T unique(Size count=1)=0
Get unique random test value(s).
ProcessID pid_t
Used for process IDs and process group IDs.
virtual T random(Size count=1)=0
Get random test value(s).
Vectors are dynamically resizeable Arrays.