MCPcopy Create free account
hub / github.com/apache/singa / Equals

Method Equals

test/gtest/gtest.h:14247–14265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14245 }
14246 virtual const ParamType* Current() const { return &current_value_; }
14247 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14248 // Having the same base generator guarantees that the other
14249 // iterator is of the same type and we can downcast.
14250 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14251 << "The program attempted to compare iterators "
14252 << "from different generators." << std::endl;
14253 const Iterator* typed_other =
14254 CheckedDowncastToActualType<const Iterator>(&other);
14255 // We must report iterators equal if they both point beyond their
14256 // respective ranges. That can happen in a variety of fashions,
14257 // so we have to consult AtEnd().
14258 return (AtEnd() && typed_other->AtEnd()) ||
14259 (
14260 current1_ == typed_other->current1_ &&
14261 current2_ == typed_other->current2_ &&
14262 current3_ == typed_other->current3_ &&
14263 current4_ == typed_other->current4_ &&
14264 current5_ == typed_other->current5_);
14265 }
14266
14267 private:
14268 Iterator(const Iterator& other)

Callers

nothing calls this directly

Calls 2

BaseGeneratorMethod · 0.45
AtEndMethod · 0.45

Tested by

no test coverage detected