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

Function test_get

lib_acl_cpp/samples/redis/redis/redis.cpp:27–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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…