| 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/node_ordinal.h" | 5 #include "sync/internal_api/public/base/node_ordinal.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cstddef> | 10 #include <cstddef> |
| 11 #include <functional> | 11 #include <functional> |
| 12 #include <limits> | 12 #include <limits> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/macros.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 17 |
| 17 namespace syncer { | 18 namespace syncer { |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 const int64_t kTestValues[] = {0LL, | 22 const int64_t kTestValues[] = {0LL, |
| 22 1LL, | 23 1LL, |
| 23 -1LL, | 24 -1LL, |
| 24 2LL, | 25 2LL, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 TEST(NodeOrdinalTest, CreateBetween) { | 140 TEST(NodeOrdinalTest, CreateBetween) { |
| 140 const NodeOrdinal ordinal1("\1\1\1\1\1\1\1\1"); | 141 const NodeOrdinal ordinal1("\1\1\1\1\1\1\1\1"); |
| 141 const NodeOrdinal ordinal2("\1\1\1\1\1\1\1\3"); | 142 const NodeOrdinal ordinal2("\1\1\1\1\1\1\1\3"); |
| 142 EXPECT_EQ("\1\1\1\1\1\1\1\2", | 143 EXPECT_EQ("\1\1\1\1\1\1\1\2", |
| 143 ordinal1.CreateBetween(ordinal2).ToInternalValue()); | 144 ordinal1.CreateBetween(ordinal2).ToInternalValue()); |
| 144 } | 145 } |
| 145 | 146 |
| 146 } // namespace | 147 } // namespace |
| 147 | 148 |
| 148 } // namespace syncer | 149 } // namespace syncer |
| OLD | NEW |