| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/sync/notifier/base/string.h" | 5 #include "chrome/browser/sync/notifier/base/string.h" |
| 6 #include "notifier/testing/notifier/unittest.h" | |
| 7 | 6 |
| 8 namespace notifier { | 7 namespace notifier { |
| 9 | 8 |
| 10 TEST_NOTIFIER_F(StringTest); | 9 TEST_NOTIFIER_F(StringTest); |
| 11 | 10 |
| 12 TEST_F(StringTest, StringToInt) { | 11 TEST_F(StringTest, StringToInt) { |
| 13 ASSERT_EQ(StringToInt("625"), 625); | 12 ASSERT_EQ(StringToInt("625"), 625); |
| 14 ASSERT_EQ(StringToInt("6"), 6); | 13 ASSERT_EQ(StringToInt("6"), 6); |
| 15 ASSERT_EQ(StringToInt("0"), 0); | 14 ASSERT_EQ(StringToInt("0"), 0); |
| 16 ASSERT_EQ(StringToInt(" 122"), 122); | 15 ASSERT_EQ(StringToInt(" 122"), 122); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 StringReplace(&s, "=", " = ", true); | 352 StringReplace(&s, "=", " = ", true); |
| 354 EXPECT_STREQ(s.c_str(), ""); | 353 EXPECT_STREQ(s.c_str(), ""); |
| 355 | 354 |
| 356 // Input and string to replace is an empty string. | 355 // Input and string to replace is an empty string. |
| 357 s = ""; | 356 s = ""; |
| 358 StringReplace(&s, "", " = ", false); | 357 StringReplace(&s, "", " = ", false); |
| 359 EXPECT_STREQ(s.c_str(), ""); | 358 EXPECT_STREQ(s.c_str(), ""); |
| 360 } | 359 } |
| 361 | 360 |
| 362 } // namespace notifier | 361 } // namespace notifier |
| OLD | NEW |