| 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/util/immutable.h" | 5 #include "sync/internal_api/public/util/immutable.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <list> | 10 #include <list> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 namespace syncer { | 19 namespace syncer { |
| 20 | 20 |
| 21 // Helper class that keeps track of the token passed in at | 21 // Helper class that keeps track of the token passed in at |
| 22 // construction and how many times that token is copied. | 22 // construction and how many times that token is copied. |
| 23 class TokenCore : public base::RefCounted<TokenCore> { | 23 class TokenCore : public base::RefCounted<TokenCore> { |
| 24 public: | 24 public: |
| 25 explicit TokenCore(const char* token) : token_(token), copy_count_(0) {} | 25 explicit TokenCore(const char* token) : token_(token), copy_count_(0) {} |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 "List"); | 235 "List"); |
| 236 } | 236 } |
| 237 | 237 |
| 238 TEST_F(ImmutableTest, Set) { | 238 TEST_F(ImmutableTest, Set) { |
| 239 RunTokenContainerTest<std::set<Token>, Immutable<std::set<Token> > >( | 239 RunTokenContainerTest<std::set<Token>, Immutable<std::set<Token> > >( |
| 240 "Set"); | 240 "Set"); |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace | 243 } // namespace |
| 244 } // namespace syncer | 244 } // namespace syncer |
| OLD | NEW |