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

Method Equals

test/gtest/gtest.h:15307–15330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15305 }
15306 virtual const ParamType* Current() const { return &current_value_; }
15307 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
15308 // Having the same base generator guarantees that the other
15309 // iterator is of the same type and we can downcast.
15310 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15311 << "The program attempted to compare iterators "
15312 << "from different generators." << std::endl;
15313 const Iterator* typed_other =
15314 CheckedDowncastToActualType<const Iterator>(&other);
15315 // We must report iterators equal if they both point beyond their
15316 // respective ranges. That can happen in a variety of fashions,
15317 // so we have to consult AtEnd().
15318 return (AtEnd() && typed_other->AtEnd()) ||
15319 (
15320 current1_ == typed_other->current1_ &&
15321 current2_ == typed_other->current2_ &&
15322 current3_ == typed_other->current3_ &&
15323 current4_ == typed_other->current4_ &&
15324 current5_ == typed_other->current5_ &&
15325 current6_ == typed_other->current6_ &&
15326 current7_ == typed_other->current7_ &&
15327 current8_ == typed_other->current8_ &&
15328 current9_ == typed_other->current9_ &&
15329 current10_ == typed_other->current10_);
15330 }
15331
15332 private:
15333 Iterator(const Iterator& other)

Callers

nothing calls this directly

Calls 2

BaseGeneratorMethod · 0.45
AtEndMethod · 0.45

Tested by

no test coverage detected