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/api/sync_error.h" | 5 #include "sync/api/sync_error.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
| 12 namespace csync { |
| 13 |
12 using std::string; | 14 using std::string; |
13 using syncable::ModelType; | 15 using syncable::ModelType; |
14 | 16 |
15 namespace { | 17 namespace { |
16 | 18 |
17 typedef testing::Test SyncErrorTest; | 19 typedef testing::Test SyncErrorTest; |
18 | 20 |
19 TEST_F(SyncErrorTest, Unset) { | 21 TEST_F(SyncErrorTest, Unset) { |
20 SyncError error; | 22 SyncError error; |
21 EXPECT_FALSE(error.IsSet()); | 23 EXPECT_FALSE(error.IsSet()); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 SyncError error2; | 125 SyncError error2; |
124 EXPECT_FALSE(error2.IsSet()); | 126 EXPECT_FALSE(error2.IsSet()); |
125 EXPECT_EQ(std::string(), error2.ToString()); | 127 EXPECT_EQ(std::string(), error2.ToString()); |
126 | 128 |
127 error2 = error; | 129 error2 = error; |
128 EXPECT_TRUE(error2.IsSet()); | 130 EXPECT_TRUE(error2.IsSet()); |
129 EXPECT_NE(string::npos, error.ToString().find(expected)); | 131 EXPECT_NE(string::npos, error.ToString().find(expected)); |
130 } | 132 } |
131 | 133 |
132 } // namespace | 134 } // namespace |
| 135 |
| 136 } // namespace csync |
OLD | NEW |