Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: sync/protocol/proto_enum_conversions_unittest.cc

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/protocol/proto_enum_conversions.cc ('k') | sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #include "sync/protocol/proto_enum_conversions.h" 7 #include "sync/protocol/proto_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 csync { 13 namespace syncer {
14 namespace { 14 namespace {
15 15
16 class ProtoEnumConversionsTest : public testing::Test { 16 class ProtoEnumConversionsTest : public testing::Test {
17 }; 17 };
18 18
19 template <class T> 19 template <class T>
20 void TestEnumStringFunction(const char* (*enum_string_fn)(T), 20 void TestEnumStringFunction(const char* (*enum_string_fn)(T),
21 int enum_min, int enum_max) { 21 int enum_min, int enum_max) {
22 for (int i = enum_min; i <= enum_max; ++i) { 22 for (int i = enum_min; i <= enum_max; ++i) {
23 const std::string& str = enum_string_fn(static_cast<T>(i)); 23 const std::string& str = enum_string_fn(static_cast<T>(i));
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 TEST_F(ProtoEnumConversionsTest, GetActionString) { 85 TEST_F(ProtoEnumConversionsTest, GetActionString) {
86 TestEnumStringFunction( 86 TestEnumStringFunction(
87 GetActionString, 87 GetActionString,
88 sync_pb::SyncEnums::Action_MIN, 88 sync_pb::SyncEnums::Action_MIN,
89 sync_pb::SyncEnums::Action_MAX); 89 sync_pb::SyncEnums::Action_MAX);
90 } 90 }
91 91
92 } // namespace 92 } // namespace
93 } // namespace csync 93 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_enum_conversions.cc ('k') | sync/protocol/proto_value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698