| 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 // Keep this file in sync with entry_kernel.h. | 5 // Keep this file in sync with entry_kernel.h. |
| 6 | 6 |
| 7 #include "sync/syncable/syncable_enum_conversions.h" | 7 #include "sync/syncable/syncable_enum_conversions.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace syncer { |
| 13 namespace syncable { | 14 namespace syncable { |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 class SyncableEnumConversionsTest : public testing::Test { | 17 class SyncableEnumConversionsTest : public testing::Test { |
| 17 }; | 18 }; |
| 18 | 19 |
| 19 template <class T> | 20 template <class T> |
| 20 void TestEnumStringFunction(const char* (*enum_string_fn)(T), | 21 void TestEnumStringFunction(const char* (*enum_string_fn)(T), |
| 21 int enum_min, int enum_max) { | 22 int enum_min, int enum_max) { |
| 22 EXPECT_LE(enum_min, enum_max); | 23 EXPECT_LE(enum_min, enum_max); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 GetProtoFieldString, PROTO_FIELDS_BEGIN, PROTO_FIELDS_END - 1); | 77 GetProtoFieldString, PROTO_FIELDS_BEGIN, PROTO_FIELDS_END - 1); |
| 77 } | 78 } |
| 78 | 79 |
| 79 TEST_F(SyncableEnumConversionsTest, GetBitTempString) { | 80 TEST_F(SyncableEnumConversionsTest, GetBitTempString) { |
| 80 TestEnumStringFunction( | 81 TestEnumStringFunction( |
| 81 GetBitTempString, BIT_TEMPS_BEGIN, BIT_TEMPS_END - 1); | 82 GetBitTempString, BIT_TEMPS_BEGIN, BIT_TEMPS_END - 1); |
| 82 } | 83 } |
| 83 | 84 |
| 84 } // namespace | 85 } // namespace |
| 85 } // namespace syncable | 86 } // namespace syncable |
| 87 } // namespace syncer |
| OLD | NEW |