MCPcopy Create free account
hub / github.com/acl-dev/acl / test_del

Function test_del

lib_acl_cpp/samples/redis/redis/redis.cpp:50–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static bool test_del(acl::redis& cmd, int n)
51{
52 acl::string key;
53
54 for (int i = 0; i < n; i++)
55 {
56 key.format("%s_%d", __keypre.c_str(), i);
57 cmd.clear();
58 int ret = cmd.del_one(key.c_str());
59 if (ret < 0)
60 {
61 printf("del key: %s error: %s\r\n", key.c_str(),
62 cmd.result_error());
63 return false;
64 }
65 else if (i < 10)
66 printf("del ok, key: %s\r\n", key.c_str());
67 }
68
69 return true;
70}
71
72static bool test_expire(acl::redis& cmd, int n)
73{

Callers 1

mainFunction · 0.70

Calls 5

del_oneMethod · 0.80
result_errorMethod · 0.80
formatMethod · 0.45
c_strMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…