//redis keys TEST_F(Gtest, test_Redis_KEYS) { Redis *r = new Redis(); if (!r->connect("localhost", 6379)) { printf("connect error!\n"); } std::list<std::string> list = r->getPrefixKey(ConstValue::USER_PERFIX); for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++) { std::cout << *(it) << std::endl; } // EXPECT_EQ(name, r->get("name")); }