| 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 "components/sync/base/ordinal.h" | 5 #include "components/sync/base/ordinal.h" |
| 6 | 6 |
| 7 #include <stdint.h> | |
| 8 | |
| 9 #include <algorithm> | |
| 10 #include <cctype> | 7 #include <cctype> |
| 11 #include <cstddef> | |
| 12 #include <string> | |
| 13 #include <vector> | 8 #include <vector> |
| 14 | 9 |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 11 |
| 17 namespace syncer { | 12 namespace syncer { |
| 18 | 13 |
| 19 namespace { | 14 namespace { |
| 20 | 15 |
| 21 struct TestOrdinalTraits { | 16 struct TestOrdinalTraits { |
| 22 static const uint8_t kZeroDigit = '0'; | 17 static const uint8_t kZeroDigit = '0'; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 std::vector<LongOrdinal> ordinals = sorted_ordinals; | 352 std::vector<LongOrdinal> ordinals = sorted_ordinals; |
| 358 std::random_shuffle(ordinals.begin(), ordinals.end()); | 353 std::random_shuffle(ordinals.begin(), ordinals.end()); |
| 359 std::sort(ordinals.begin(), ordinals.end(), LongOrdinal::LessThanFn()); | 354 std::sort(ordinals.begin(), ordinals.end(), LongOrdinal::LessThanFn()); |
| 360 EXPECT_TRUE(std::equal(ordinals.begin(), ordinals.end(), | 355 EXPECT_TRUE(std::equal(ordinals.begin(), ordinals.end(), |
| 361 sorted_ordinals.begin(), LongOrdinal::EqualsFn())); | 356 sorted_ordinals.begin(), LongOrdinal::EqualsFn())); |
| 362 } | 357 } |
| 363 | 358 |
| 364 } // namespace | 359 } // namespace |
| 365 | 360 |
| 366 } // namespace syncer | 361 } // namespace syncer |
| OLD | NEW |