summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d64c3e)
raw | patch | inline | side by side (parent: 1d64c3e)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 20 May 2015 20:04:54 +0000 (22:04 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 20 May 2015 20:04:54 +0000 (22:04 +0200) |
index 1955528e919a8c753b1c1c99842a15296890b716..d421e64df3dd90136776a9b84925ccccf689ffab 100644 (file)
--- a/t/unit/core/data_test.c
+++ b/t/unit/core/data_test.c
#include "core/data.h"
#include "testutils.h"
-#include <assert.h>
#include <check.h>
static regex_t empty_re;
check = sdb_data_parse(".", SDB_TYPE_REGEX, &d2);
fail_unless(check == 0,
"INTERNAL ERROR: Failed to parse regex '.'");
- assert(d2.type == SDB_TYPE_REGEX);
+ ck_assert(d2.type == SDB_TYPE_REGEX);
check = sdb_data_copy(&d1, &d2);
fail_unless(!check, "sdb_data_copy() = %i; expected: 0", check);
fail_unless(d1.type == d2.type,
index 704ad067fc52d9fba04a8ea5bbe901a3013583c6..b69573c45fde0afd0b90ab5db4402f225eb9ac00 100644 (file)
#include "core/store.h"
#include "testutils.h"
-#include <assert.h>
-
#include <check.h>
#include <stdlib.h>
sdb_strbuf_clear(buf);
f = sdb_store_json_formatter(buf,
store_tojson_data[_i].type, SDB_WANT_ARRAY);
- assert(f);
+ ck_assert(f != NULL);
status = sdb_store_scan(store_tojson_data[_i].type,
/* m = */ NULL, filter, store_tojson_data[_i].f, f);
index 33fd1d24ec4d55e257cd9ab49bbd6b76fcbbe840..b4c6015b7bfb0dcfe2d338eb05af51555491efca 100644 (file)
#include "parser/parser.h"
#include "testutils.h"
-#include <assert.h>
-
#include <check.h>
#include <string.h>
};
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,
index b4cc1878555198425a44e7b3bb4abe9acd691de5..11a93a24fbafeb8b495549a9a89b4c56c7aecc2e 100644 (file)
#include "utils/strbuf.h"
-#include <assert.h>
#include <check.h>
#include <stdlib.h>
static ssize_t
mock_conn_read(sdb_conn_t *conn, size_t len)
{
- return sdb_strbuf_read(conn->buf, conn->fd, len);
+ return sdb_strbuf_read(conn->buf, conn->fd, len);
} /* conn_read */
static ssize_t
mock_conn_write(sdb_conn_t *conn, const void *buf, size_t len)
{
- return sdb_write(conn->fd, len, buf);
+ return sdb_write(conn->fd, len, buf);
} /* conn_write */
static sdb_conn_t *
conn->write = mock_conn_write;
conn->username = strdup(username);
- assert(conn->username);
+ ck_assert(conn->username != NULL);
conn->cmd = SDB_CONNECTION_IDLE;
conn->cmd_len = 0;
TCase *tc;
char *tmp = sdb_get_current_user();
- assert(tmp);
strcpy(username, tmp);
free(tmp);