Lines Matching refs:reply

40 int TestMatchReply(RedisModuleCallReply *reply, char *str) {  in TestMatchReply()  argument
42 mystr = RedisModule_CreateStringFromCallReply(reply); in TestMatchReply()
56 RedisModuleCallReply *reply; in TestCall() local
61 reply = RedisModule_Call(ctx,"LRANGE","ccc","mylist","0","-1"); in TestCall()
62 long long items = RedisModule_CallReplyLength(reply); in TestCall()
67 item0 = RedisModule_CallReplyArrayElement(reply,0); in TestCall()
68 item1 = RedisModule_CallReplyArrayElement(reply,1); in TestCall()
310 int TestAssertStringReply(RedisModuleCtx *ctx, RedisModuleCallReply *reply, char *str, size_t len) { in TestAssertStringReply() argument
313 if (RedisModule_CallReplyType(reply) != REDISMODULE_REPLY_STRING) { in TestAssertStringReply()
315 RedisModule_CallReplyType(reply)); in TestAssertStringReply()
318 mystr = RedisModule_CreateStringFromCallReply(reply); in TestAssertStringReply()
333 int TestAssertIntegerReply(RedisModuleCtx *ctx, RedisModuleCallReply *reply, long long expected) { in TestAssertIntegerReply() argument
334 if (RedisModule_CallReplyType(reply) != REDISMODULE_REPLY_INTEGER) { in TestAssertIntegerReply()
336 RedisModule_CallReplyType(reply)); in TestAssertIntegerReply()
339 long long val = RedisModule_CallReplyInteger(reply); in TestAssertIntegerReply()
352 reply = RedisModule_Call(ctx,name,__VA_ARGS__); \
361 RedisModuleCallReply *reply; in TestIt() local
365 if (!TestAssertIntegerReply(ctx,reply,0)) goto fail; in TestIt()
368 if (!TestAssertStringReply(ctx,reply,"PONG",4)) goto fail; in TestIt()
371 if (!TestAssertStringReply(ctx,reply,"OK",2)) goto fail; in TestIt()
374 if (!TestAssertStringReply(ctx,reply,"OK",2)) goto fail; in TestIt()
377 if (!TestAssertStringReply(ctx,reply,"foobar",6)) goto fail; in TestIt()
380 if (!TestAssertStringReply(ctx,reply,"OK",2)) goto fail; in TestIt()
383 if (!TestAssertStringReply(ctx,reply,"foobar",6)) goto fail; in TestIt()
386 if (!TestAssertStringReply(ctx,reply,"Got 3 args. argv[1]: foo, argv[2]: bar",38)) goto fail; in TestIt()
389 if (!TestAssertStringReply(ctx,reply,"OK",2)) goto fail; in TestIt()