bool operator==(const Query& other) const { return (getHint() == other.getHint() && getZone() == other.getZone() && getQueryType() == other.getQueryType() && getRrLabel() == other.getRrLabel() && getRrType() == other.getRrType()); }
TEST(QueryTest, Hint) { Query q; q.hint(BSON("a" << 1)); BSONElement hint = q.getHint(); ASSERT_TRUE(hint.Obj().hasField("a")); ASSERT_EQUALS(hint.Obj().getIntField("a"), 1); }