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

Function test_get

lib_acl_cpp/samples/redis/redis_ssl/redis.cpp:24–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24static bool test_get(acl::redis& cmd, int n)
25{
26 acl::string key, val;
27
28 for (int i = 0; i < n; i++) {
29 key.format("%s_%d", __keypre.c_str(), i);
30 cmd.clear();
31 val.clear();
32 if (cmd.get(key, val) == false) {
33 printf("get key: %s error: %s\r\n", key.c_str(),
34 cmd.result_error());
35 return false;
36 } else if (i < 10)
37 printf("get key: %s ok, val: %s\r\n", key.c_str(),
38 val.c_str());
39 }
40
41 return true;
42}
43
44static bool test_del(acl::redis& cmd, int n)
45{

Callers 1

mainFunction · 0.70

Calls 5

result_errorMethod · 0.80
formatMethod · 0.45
c_strMethod · 0.45
clearMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…