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

Method Equals

test/gtest/gtest.h:13948–13964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13946 }
13947 virtual const ParamType* Current() const { return &current_value_; }
13948 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
13949 // Having the same base generator guarantees that the other
13950 // iterator is of the same type and we can downcast.
13951 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
13952 << "The program attempted to compare iterators "
13953 << "from different generators." << std::endl;
13954 const Iterator* typed_other =
13955 CheckedDowncastToActualType<const Iterator>(&other);
13956 // We must report iterators equal if they both point beyond their
13957 // respective ranges. That can happen in a variety of fashions,
13958 // so we have to consult AtEnd().
13959 return (AtEnd() && typed_other->AtEnd()) ||
13960 (
13961 current1_ == typed_other->current1_ &&
13962 current2_ == typed_other->current2_ &&
13963 current3_ == typed_other->current3_);
13964 }
13965
13966 private:
13967 Iterator(const Iterator& other)

Callers

nothing calls this directly

Calls 2

BaseGeneratorMethod · 0.45
AtEndMethod · 0.45

Tested by

no test coverage detected