summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/test.c b/test.c
index 02a2197..7703292 100644
--- a/test.c
+++ b/test.c
@@ -123,7 +123,7 @@ static long long usec(void) {
} while (1)
/* Helper to extract Redis version information. Aborts on any failure. */
-#define REDIS_VERSION_FIELD "redis_version:"
+#define REDIS_VERSION_FIELD "redict_version:"
void get_redis_version(redisContext *c, int *majorptr, int *minorptr) {
redisReply *reply;
char *eptr, *s, *e;
@@ -155,7 +155,7 @@ void get_redis_version(redisContext *c, int *majorptr, int *minorptr) {
abort:
freeReplyObject(reply);
- fprintf(stderr, "Error: Cannot determine Redis version, aborting\n");
+ fprintf(stderr, "Error: Cannot determine Redict version, aborting\n");
exit(1);
}
@@ -254,7 +254,7 @@ static redisContext *do_connect(struct config config) {
}
if (c == NULL) {
- printf("Connection error: can't allocate redis context\n");
+ printf("Connection error: can't allocate redict context\n");
exit(1);
} else if (c->err) {
printf("Connection error: %s\n", c->errstr);
@@ -878,7 +878,7 @@ static void test_free_null(void) {
void *redisCtx = NULL;
void *reply = NULL;
- test("Don't fail when redisFree is passed a NULL value: ");
+ test("Don't fail when redictFree is passed a NULL value: ");
redisFree(redisCtx);
test_cond(redisCtx == NULL);
@@ -925,16 +925,16 @@ static void test_allocator_injection(void) {
// Override hiredis allocators
hiredisSetAllocators(&ha);
- test("redisContext uses injected allocators: ");
+ test("redictContext uses injected allocators: ");
redisContext *c = redisConnect("localhost", 6379);
test_cond(c == NULL);
- test("redisReader uses injected allocators: ");
+ test("redictReader uses injected allocators: ");
redisReader *reader = redisReaderCreate();
test_cond(reader == NULL);
/* Make sure hiredis itself protects against a non-overflow checking calloc */
- test("hiredis calloc wrapper protects against overflow: ");
+ test("hiredict calloc wrapper protects against overflow: ");
ha.callocFn = hi_calloc_insecure;
hiredisSetAllocators(&ha);
ptr = hi_calloc((SIZE_MAX / sizeof(void*)) + 3, sizeof(void*));
@@ -1114,13 +1114,13 @@ static void test_resp3_push_options(struct config config) {
redisContext *c;
redisOptions options;
- test("We set a default RESP3 handler for redisContext: ");
+ test("We set a default RESP3 handler for redictContext: ");
options = get_redis_tcp_options(config);
assert((c = redisConnectWithOptions(&options)) != NULL);
test_cond(c->push_cb != NULL);
redisFree(c);
- test("We don't set a default RESP3 push handler for redisAsyncContext: ");
+ test("We don't set a default RESP3 push handler for redictAsyncContext: ");
options = get_redis_tcp_options(config);
assert((ac = redisAsyncConnectWithOptions(&options)) != NULL);
test_cond(ac->c.push_cb == NULL);
@@ -1133,14 +1133,14 @@ static void test_resp3_push_options(struct config config) {
test_cond(c->push_cb == NULL);
redisFree(c);
- test("We can use redisOptions to set a custom PUSH handler for redisContext: ");
+ test("We can use redictOptions to set a custom PUSH handler for redctsContext: ");
options = get_redis_tcp_options(config);
options.push_cb = push_handler;
assert((c = redisConnectWithOptions(&options)) != NULL);
test_cond(c->push_cb == push_handler);
redisFree(c);
- test("We can use redisOptions to set a custom PUSH handler for redisAsyncContext: ");
+ test("We can use redictOptions to set a custom PUSH handler for redictAsyncContext: ");
options = get_redis_tcp_options(config);
options.async_push_cb = push_handler_async;
assert((ac = redisAsyncConnectWithOptions(&options)) != NULL);
@@ -1158,7 +1158,7 @@ static void test_privdata_hooks(struct config config) {
redisOptions options;
redisContext *c;
- test("We can use redisOptions to set privdata: ");
+ test("We can use redictOptions to set privdata: ");
options = get_redis_tcp_options(config);
REDIS_OPTIONS_SET_PRIVDATA(&options, &data, free_privdata);
assert((c = redisConnectWithOptions(&options)) != NULL);
@@ -1253,7 +1253,7 @@ static void test_blocking_connection(struct config config) {
freeReplyObject(reply);
/* Make sure passing NULL to redisGetReply is safe */
- test("Can pass NULL to redisGetReply: ");
+ test("Can pass NULL to redictGetReply: ");
assert(redisAppendCommand(c, "PING") == REDIS_OK);
test_cond(redisGetReply(c, NULL) == REDIS_OK);
@@ -1273,7 +1273,7 @@ static int detect_debug_sleep(redisContext *c) {
if (reply == NULL || c->err) {
const char *cause = c->err ? c->errstr : "(none)";
- fprintf(stderr, "Error testing for DEBUG SLEEP (Redis error: %s), exiting\n", cause);
+ fprintf(stderr, "Error testing for DEBUG SLEEP (Redict error: %s), exiting\n", cause);
exit(-1);
}
@@ -1565,33 +1565,33 @@ static void test_throughput(struct config config) {
// test_cond(__test_callback_flags == 1);
// redisFree(c);
//
-// test("Calls disconnect callback on redisDisconnect: ");
+// test("Calls disconnect callback on redictDisconnect: ");
// c = __connect_nonblock();
// redisSetDisconnectCallback(c,__test_callback,(void*)2);
// redisDisconnect(c);
// test_cond(__test_callback_flags == 2);
// redisFree(c);
//
-// test("Calls disconnect callback and free callback on redisFree: ");
+// test("Calls disconnect callback and free callback on redictFree: ");
// c = __connect_nonblock();
// redisSetDisconnectCallback(c,__test_callback,(void*)2);
// redisSetFreeCallback(c,__test_callback,(void*)4);
// redisFree(c);
// test_cond(__test_callback_flags == ((2 << 8) | 4));
//
-// test("redisBufferWrite against empty write buffer: ");
+// test("redictBufferWrite against empty write buffer: ");
// c = __connect_nonblock();
// test_cond(redisBufferWrite(c,&wdone) == REDIS_OK && wdone == 1);
// redisFree(c);
//
-// test("redisBufferWrite against not yet connected fd: ");
+// test("redictBufferWrite against not yet connected fd: ");
// c = __connect_nonblock();
// redisCommand(c,"PING");
// test_cond(redisBufferWrite(c,NULL) == REDIS_ERR &&
// strncmp(c->error,"write:",6) == 0);
// redisFree(c);
//
-// test("redisBufferWrite against closed fd: ");
+// test("redictBufferWrite against closed fd: ");
// c = __connect_nonblock();
// redisCommand(c,"PING");
// redisDisconnect(c);
@@ -1622,7 +1622,7 @@ static void test_throughput(struct config config) {
// test_cond(__test_callback_flags == 0x010203);
// redisFree(c);
//
-// test("redisDisconnect executes pending callbacks with NULL reply: ");
+// test("redictDisconnect executes pending callbacks with NULL reply: ");
// c = __connect_nonblock();
// redisSetDisconnectCallback(c,__test_callback,(void*)1);
// redisCommandWithCallback(c,__test_reply_callback,(void*)2,"PING");