Abstract superclass for Standard Tests/Benchmarks of relation-like data structures with insert() and lookup() Methods.
More...
#include <rtest.h>
Abstract superclass for Standard Tests/Benchmarks of relation-like data structures with insert() and lookup() Methods.
- Author
- Stefan Brass
- Date
- 14.10.2016
str_t rtest_c::error_row |
( |
| ) |
|
|
inline |
String representation of the row that caused an error to be detected. Of course, this should be printed as part of the error message. Since this superclass should work with tests of arbitrary relations, the row can only be returned as string. Although most relations work with columns of type int, this is not required by the system.
This function should only be called if an error was detected.
- Returns
- Row that caused an error (string to be printed as part of the error message).
void rtest_c::error_row_close |
( |
| ) |
|
|
inlineprotected |
Close the buffer for the display version of the row that caused the error.
void rtest_c::error_row_int |
( |
int |
val | ) |
|
|
inlineprotected |
Write an integer column value to the string buffer for the display version of the row that caused the error.
- Parameters
-
void rtest_c::error_row_open |
( |
| ) |
|
|
inlineprotected |
Start writing the buffer for the display version of the row at which an error was detected.
virtual int rtest_c::insert |
( |
| ) |
|
|
pure virtual |
Insert a specified number of rows.
- Returns
- 0 if successful, otherwise number i of the row where insertion failed.
void rtest_c::inserted_rows |
( |
int |
n | ) |
|
|
inlineprotected |
Add number of inserted rows. This function must be called when a test function inserted rows into the relation to be tested. If an error occurred during the test, this must be the number of insert operations that were successfully executed before the error was detected.
- Parameters
-
n | Number of rows that were successfully inserted. |
virtual int rtest_c::lookup |
( |
| ) |
|
|
pure virtual |
Lookup all rows that were inserted.
- Returns
- 0 if successful, otherwise number i of the row where the lookup failed.
int rtest_c::num_rows |
( |
| ) |
|
|
inline |
Number of rows that were successfully inserted. If an error occurred, this might help in the error diagnosis. If no error occurred, this is the current size of the relation in the test.
- Returns
- Number of rows that were successfully inserted so far into the relation to be tested.
This method returns the relation that is being tested.
- Returns
- Relation that is subject of this test.
virtual int rtest_c::size_value |
( |
relsize_t |
relsize | ) |
|
|
pure virtual |
Return various data structure size measures (e.g. hash table size).
- Parameters
-
relsize | Enumeration value that selects the size measure. |
- Returns
- Value of the size measure or -1 if not applicable
The documentation for this class was generated from the following files: