| 151 | } |
| 152 | |
| 153 | static bool test_strlen(acl::redis_string& redis, int n) |
| 154 | { |
| 155 | acl::string key; |
| 156 | |
| 157 | for (int i = 0; i < n; i++) |
| 158 | { |
| 159 | key.format("%s_%d", __keypre.c_str(), i); |
| 160 | |
| 161 | redis.clear(); |
| 162 | int ret = redis.get_strlen(key.c_str()); |
| 163 | if (ret < 0) |
| 164 | { |
| 165 | printf("str_len error: %s, key: %s\r\n", |
| 166 | redis.result_error(), key.c_str()); |
| 167 | return false; |
| 168 | } |
| 169 | else if (i < 10) |
| 170 | printf("key: %s's value's length: %d\r\n", |
| 171 | key.c_str(), ret); |
| 172 | } |
| 173 | |
| 174 | return true; |
| 175 | } |
| 176 | |
| 177 | static bool test_mset(acl::redis_string& redis, int n) |
| 178 | { |
no test coverage detected
searching dependent graphs…