26 #ifndef RTEST_INCLUDED
27 #define RTEST_INCLUDED
34 #include "../base/ver.h"
38 #include "../base/str.h"
41 #ifndef CHECK_INCLUDED
42 #include "../base/check.h"
45 #ifndef RELSIZE_INCLUDED
46 #include "../rel/relsize.h"
50 #include "../rel/rel.h"
62 static const long RTEST_MAGIC = 0x5254450AL;
68 static const int RTEST_ROW_SIZE = 80;
118 virtual int size_value(relsize_t relsize) = 0;
183 CHECK(ErrorRow[0] !=
'\0',
184 "rtest_c::error_row: No error detected");
216 "rtest_c::inserted_rows: n must be non-negative");
234 ErrorRowPtr = ErrorRow;
235 ErrorRowFree = RTEST_ROW_SIZE - 1;
239 if(ErrorRowFree >= 1) {
240 *ErrorRowPtr++ =
'[';
262 if(ErrorRowCol > 0 && ErrorRowFree >= 2) {
263 *ErrorRowPtr++ =
',';
265 *ErrorRowPtr++ =
' ';
270 int chars =
str_int(ErrorRowPtr, ErrorRowFree, val);
271 ErrorRowPtr += chars;
272 ErrorRowFree -= chars;
291 if(ErrorRowFree >= 1) {
292 *ErrorRowPtr++ =
']';
343 char ErrorRow[RTEST_ROW_SIZE];
370 #define RTEST_NULL (static_cast<rtest_t>(0))
virtual int size_value(relsize_t relsize)=0
int str_int(char *buf, int buf_len, int n)
Definition: str.cpp:250
void inserted_rows(int n)
Definition: rtest.h:209
Abstract superclass for Standard Tests/Benchmarks of relation-like data structures with insert() and ...
Definition: rtest.h:81
void error_row_int(int val)
Definition: rtest.h:256
str_t error_row()
Definition: rtest.h:177
#define CHECK_VALID(EX)
Definition: check.h:85
const char * str_t
Definition: str.h:41
rel_t rel()
Definition: rtest.h:131
void error_row_open()
Definition: rtest.h:228
void error_row_close()
Definition: rtest.h:285
#define STR_NULL
Definition: str.h:52
#define CHECK(EX, MSG)
Definition: check.h:69
int num_rows()
Definition: rtest.h:151