26 #ifndef TEST_SET2_INCLUDED
27 #define TEST_SET2_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"
49 #ifndef GEN_CUR2_INCLUDED
53 #ifndef RTEST_INCLUDED
65 static const long TEST_SET2_MAGIC = 0x5453320AL;
82 DataCur(data_rel(test_id))
85 CHECK_PAR(set,
"test_set2_c::constructor");
86 CHECK(test_id >= 0 && test_id <= 4,
87 "test_set2_c::constructor: unknown test_id");
133 while(DataCur.fetch()) {
136 int c1 = DataCur.c1();
137 int c2 = DataCur.c2();
138 bool ok = Set->insert(c1, c2);
173 while(DataCur.fetch()) {
176 int c1 = DataCur.c1();
177 int c2 = DataCur.c2();
178 bool ok = Set->contains(c1, c2);
201 int size_value(relsize_t relsize) {
202 return Set->size_value(relsize);
216 if(Magic != TEST_SET2_MAGIC)
217 return "wrong magic number";
220 str_t msg = rtest_c::check();
242 "Test for sets with one int column (test_set2_c)";
245 rtest_c::dump(headline);
274 int data_rel(
int test_id)
277 CHECK(test_id >= 0 && test_id <= 4,
278 "test_set2_c::data_rel: unknown test_id");
299 "test_set2_c::data_rel: bad id");
#define CHECK_CODE(CODE)
Definition: check.h:167
Superclass for Standard Tests of Relation-like Data Structures.
void inserted_rows(int n)
Definition: rtest.h:209
#define CHECK_IMPOSSIBLE(MSG)
Definition: check.h:151
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
#define CHECK_VALID(EX)
Definition: check.h:85
const char * str_t
Definition: str.h:41
Definition: test_set2.h:72
Definition: gen_cur2.h:63
void error_row_open()
Definition: rtest.h:228
Cursor over Generated Relations with two Integer Columns (for Tests).
void error_row_close()
Definition: rtest.h:285
#define STR_NULL
Definition: str.h:52
#define CHECK(EX, MSG)
Definition: check.h:69
#define CHECK_PAR(PAR, PLACE)
Definition: check.h:102