| 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 { | 12 namespace syncer { |
| 13 | 13 |
| 14 using std::string; | 14 using std::string; |
| 15 using syncable::ModelType; | 15 using syncable::ModelType; |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 typedef testing::Test SyncErrorTest; | 19 typedef testing::Test SyncErrorTest; |
| 20 | 20 |
| 21 TEST_F(SyncErrorTest, Unset) { | 21 TEST_F(SyncErrorTest, Unset) { |
| 22 SyncError error; | 22 SyncError error; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 EXPECT_FALSE(error2.IsSet()); | 126 EXPECT_FALSE(error2.IsSet()); |
| 127 EXPECT_EQ(std::string(), error2.ToString()); | 127 EXPECT_EQ(std::string(), error2.ToString()); |
| 128 | 128 |
| 129 error2 = error; | 129 error2 = error; |
| 130 EXPECT_TRUE(error2.IsSet()); | 130 EXPECT_TRUE(error2.IsSet()); |
| 131 EXPECT_NE(string::npos, error.ToString().find(expected)); | 131 EXPECT_NE(string::npos, error.ToString().find(expected)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace | 134 } // namespace |
| 135 | 135 |
| 136 } // namespace csync | 136 } // namespace syncer |
| OLD | NEW |