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

Method Equals

test/gtest/gtest.h:14424–14443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14422 }
14423 virtual const ParamType* Current() const { return &current_value_; }
14424 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14425 // Having the same base generator guarantees that the other
14426 // iterator is of the same type and we can downcast.
14427 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14428 << "The program attempted to compare iterators "
14429 << "from different generators." << std::endl;
14430 const Iterator* typed_other =
14431 CheckedDowncastToActualType<const Iterator>(&other);
14432 // We must report iterators equal if they both point beyond their
14433 // respective ranges. That can happen in a variety of fashions,
14434 // so we have to consult AtEnd().
14435 return (AtEnd() && typed_other->AtEnd()) ||
14436 (
14437 current1_ == typed_other->current1_ &&
14438 current2_ == typed_other->current2_ &&
14439 current3_ == typed_other->current3_ &&
14440 current4_ == typed_other->current4_ &&
14441 current5_ == typed_other->current5_ &&
14442 current6_ == typed_other->current6_);
14443 }
14444
14445 private:
14446 Iterator(const Iterator& other)

Callers

nothing calls this directly

Calls 2

BaseGeneratorMethod · 0.45
AtEndMethod · 0.45

Tested by

no test coverage detected