index 33c9268cb01d29fc561987b9838eb86f12b213f6..913e6b78a0905bb803a5d7073e3cc27c4a457904 100644 (file)
#include "parser/parser.h"
#include "testutils.h"
-#include <assert.h>
-
#include <check.h>
#include <string.h>
size_t i;
+ sdb_store_init();
+
for (i = 0; i < SDB_STATIC_ARRAY_LEN(hosts); ++i) {
int status = sdb_store_host(hosts[i], 1);
fail_unless(status == 0,
};
const char *op_str[] = { "<", "<=", "=", ">=", ">" };
- assert(SDB_STATIC_ARRAY_LEN(tests) == SDB_STATIC_ARRAY_LEN(op_str));
+ ck_assert(SDB_STATIC_ARRAY_LEN(tests) == SDB_STATIC_ARRAY_LEN(op_str));
host = sdb_store_get_host("a");
fail_unless(host != NULL,
};
char *op_str[] = { "<", "<=", "=", ">=", ">" };
- assert(SDB_STATIC_ARRAY_LEN(tests) == SDB_STATIC_ARRAY_LEN(op_str));
+ ck_assert(SDB_STATIC_ARRAY_LEN(tests) == SDB_STATIC_ARRAY_LEN(op_str));
host = sdb_store_get_host(cmp_obj_data[_i].host);
fail_unless(host != NULL,
NULL, 1 },
{ "host.attribute['x1'] IS NULL",
NULL, 3 },
+ /* not a boolean so neither TRUE nor FALSE: */
+ { "attribute['k1'] IS TRUE", NULL, 0 },
+ { "attribute['k1'] IS FALSE", NULL, 0 },
{ "attribute['k1'] = 'v1'", NULL, 1 },
{ "attribute['k1'] = 'v1'",
"name != 'k1'", 0 },