MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / test_is_selected

Function test_is_selected

src/redis-benchmark.cpp:1686–1696  ·  view source on GitHub ↗

Return true if the named test was selected using the -t command line * switch, or if all the tests are selected (no -t passed by user). */

Source from the content-addressed store, hash-verified

1684/* Return true if the named test was selected using the -t command line
1685 * switch, or if all the tests are selected (no -t passed by user). */
1686int test_is_selected(const char *name) {
1687 char buf[256];
1688 int l = strlen(name);
1689
1690 if (config.tests == NULL) return 1;
1691 buf[0] = ',';
1692 memcpy(buf+1,name,l);
1693 buf[l+1] = ',';
1694 buf[l+2] = '\0';
1695 return strstr(config.tests,buf) != NULL;
1696}
1697
1698int main(int argc, const char **argv) {
1699 int i;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected