FreeNOS
|
Generate test data for character strings. More...
#include <TestChar.h>
Public Member Functions | |
TestChar (Size min, Size max) | |
Constructor. More... | |
virtual | ~TestChar () |
Destructor. More... | |
virtual T | random (Size count=1) |
Get random test value(s). More... | |
virtual T | unique (Size count=1) |
Get unique random test value(s). More... | |
virtual Size | length (Size position) |
Get the length of the generated character string. More... | |
char * | random (Size count) |
Get random test value(s). More... | |
char * | unique (Size count) |
Get unique random test value(s). More... | |
Public Member Functions inherited from TestData< T > | |
TestData () | |
Constructor. More... | |
virtual | ~TestData () |
Destructor. More... | |
void | seed () |
Initialize the random number generator. More... | |
Size | count () const |
The number of generated values. More... | |
T & | get (Size index) |
Retrieve previously random generated test data by index. More... | |
T & | operator[] (Size index) |
Retrieve previously random generated test data by index. More... | |
Private Attributes | |
Size | m_max |
Maximum value. More... | |
Size | m_min |
Minimum value. More... | |
Vector< Size > | m_lengths |
String lengths. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TestData< T > | |
Vector< T > | m_values |
Vector with generated values. More... | |
Generate test data for character strings.
Definition at line 35 of file TestChar.h.
Constructor.
min | Minimum length of the character strings. |
max | Maximum length of the character strings. |
Definition at line 45 of file TestChar.h.
References TestChar< T >::m_max, and TestChar< T >::m_min.
Get the length of the generated character string.
Definition at line 81 of file TestChar.h.
References TestChar< T >::m_lengths.
Get random test value(s).
count | Number or values to generate. |
Implements TestData< T >.
Definition at line 98 of file TestChar.h.
References TestInt< T >::random(), and ZERO.
Get random test value(s).
count | Number or values to generate. |
Implements TestData< T >.
Get unique random test value(s).
count | Number of unique values to generate. |
Implements TestData< T >.
Definition at line 122 of file TestChar.h.
References MemoryBlock::copy(), and MemoryBlock::set().
Get unique random test value(s).
count | Number of unique values to generate. |
Implements TestData< T >.