void test_zscan(client &c) { c.flushdb(); std::set<std::string> expected; for (int i=42; i<442; i++) { std::string k("key"); k+=boost::lexical_cast<std::string>(i); c.zadd("myzset", {{1.2, k}}); expected.insert(k); } std::set<std::string> keys; for(auto i=c.zscan("myzset"); i!=c.end(); ++i) { keys.insert(*i); assert(i.score()==1.2); } assert(keys==expected); }