OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sync/internal_api/public/base/unique_position.h" | 5 #include "sync/internal_api/public/base/unique_position.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/sha1.h" | 13 #include "base/sha1.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "sync/protocol/unique_position.pb.h" | 15 #include "sync/protocol/unique_position.pb.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace syncer { | 18 namespace syncer { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 class UniquePositionTest : public ::testing::Test { | 22 class UniquePositionTest : public ::testing::Test { |
23 protected: | 23 protected: |
24 // Accessor to fetch the length of the position's internal representation | 24 // Accessor to fetch the length of the position's internal representation |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 IndexedLessThan<int64>(kTestValues)); | 581 IndexedLessThan<int64>(kTestValues)); |
582 std::sort(position_ordering.begin(), position_ordering.end(), | 582 std::sort(position_ordering.begin(), position_ordering.end(), |
583 IndexedLessThan<UniquePosition, PositionLessThan>(positions)); | 583 IndexedLessThan<UniquePosition, PositionLessThan>(positions)); |
584 EXPECT_NE(original_ordering, int64_ordering); | 584 EXPECT_NE(original_ordering, int64_ordering); |
585 EXPECT_EQ(int64_ordering, position_ordering); | 585 EXPECT_EQ(int64_ordering, position_ordering); |
586 } | 586 } |
587 | 587 |
588 } // namespace | 588 } // namespace |
589 | 589 |
590 } // namespace syncer | 590 } // namespace syncer |
OLD | NEW |