| Index: sync/internal_api/public/base/invalidation_test_util.cc
|
| diff --git a/sync/internal_api/public/base/invalidation_state_test_util.cc b/sync/internal_api/public/base/invalidation_test_util.cc
|
| similarity index 42%
|
| rename from sync/internal_api/public/base/invalidation_state_test_util.cc
|
| rename to sync/internal_api/public/base/invalidation_test_util.cc
|
| index a27d0456a86de8fe2924fce6dbfedecd65e0e3cd..a95b65795df827439e3050e015170c983ce17127 100644
|
| --- a/sync/internal_api/public/base/invalidation_state_test_util.cc
|
| +++ b/sync/internal_api/public/base/invalidation_test_util.cc
|
| @@ -2,10 +2,10 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "sync/internal_api/public/base/invalidation_state_test_util.h"
|
| +#include "sync/internal_api/public/base/invalidation_test_util.h"
|
|
|
| #include "base/basictypes.h"
|
| -#include "sync/internal_api/public/base/invalidation_state.h"
|
| +#include "sync/internal_api/public/base/invalidation.h"
|
|
|
| namespace syncer {
|
|
|
| @@ -17,47 +17,47 @@ using ::testing::PrintToString;
|
|
|
| namespace {
|
|
|
| -class InvalidationStateEqMatcher
|
| - : public MatcherInterface<const InvalidationState&> {
|
| +class InvalidationEqMatcher
|
| + : public MatcherInterface<const Invalidation&> {
|
| public:
|
| - explicit InvalidationStateEqMatcher(const InvalidationState& expected);
|
| + explicit InvalidationEqMatcher(const Invalidation& expected);
|
|
|
| - virtual bool MatchAndExplain(const InvalidationState& actual,
|
| + virtual bool MatchAndExplain(const Invalidation& actual,
|
| MatchResultListener* listener) const;
|
| virtual void DescribeTo(::std::ostream* os) const;
|
| virtual void DescribeNegationTo(::std::ostream* os) const;
|
|
|
| private:
|
| - const InvalidationState expected_;
|
| + const Invalidation expected_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(InvalidationStateEqMatcher);
|
| + DISALLOW_COPY_AND_ASSIGN(InvalidationEqMatcher);
|
| };
|
|
|
| -InvalidationStateEqMatcher::InvalidationStateEqMatcher(
|
| - const InvalidationState& expected) : expected_(expected) {
|
| +InvalidationEqMatcher::InvalidationEqMatcher(
|
| + const Invalidation& expected) : expected_(expected) {
|
| }
|
|
|
| -bool InvalidationStateEqMatcher::MatchAndExplain(
|
| - const InvalidationState& actual, MatchResultListener* listener) const {
|
| +bool InvalidationEqMatcher::MatchAndExplain(
|
| + const Invalidation& actual, MatchResultListener* listener) const {
|
| return expected_.payload == actual.payload;
|
| }
|
|
|
| -void InvalidationStateEqMatcher::DescribeTo(::std::ostream* os) const {
|
| +void InvalidationEqMatcher::DescribeTo(::std::ostream* os) const {
|
| *os << " is equal to " << PrintToString(expected_);
|
| }
|
|
|
| -void InvalidationStateEqMatcher::DescribeNegationTo(::std::ostream* os) const {
|
| +void InvalidationEqMatcher::DescribeNegationTo(::std::ostream* os) const {
|
| *os << " isn't equal to " << PrintToString(expected_);
|
| }
|
|
|
| } // namespace
|
|
|
| -void PrintTo(const InvalidationState& state, ::std::ostream* os) {
|
| - *os << "{ payload: " << state.payload << " }";
|
| +void PrintTo(const Invalidation& invalidation, ::std::ostream* os) {
|
| + *os << "{ payload: " << invalidation.payload << " }";
|
| }
|
|
|
| -Matcher<const InvalidationState&> Eq(const InvalidationState& expected) {
|
| - return MakeMatcher(new InvalidationStateEqMatcher(expected));
|
| +Matcher<const Invalidation&> Eq(const Invalidation& expected) {
|
| + return MakeMatcher(new InvalidationEqMatcher(expected));
|
| }
|
|
|
| } // namespace syncer
|
|
|