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 // Unit test for string manipulation functions used in the RLZ library. | 5 // Unit test for string manipulation functions used in the RLZ library. |
6 | 6 |
7 #include "rlz/lib/string_utils.h" | 7 #include "rlz/lib/string_utils.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 EXPECT_FALSE(rlz_lib::BytesToString(NULL, 5, &result)); | 61 EXPECT_FALSE(rlz_lib::BytesToString(NULL, 5, &result)); |
62 EXPECT_FALSE(rlz_lib::BytesToString(data, 5, NULL)); | 62 EXPECT_FALSE(rlz_lib::BytesToString(data, 5, NULL)); |
63 EXPECT_FALSE(rlz_lib::BytesToString(NULL, 5, NULL)); | 63 EXPECT_FALSE(rlz_lib::BytesToString(NULL, 5, NULL)); |
64 | 64 |
65 EXPECT_TRUE(rlz_lib::BytesToString(data, 5, &result)); | 65 EXPECT_TRUE(rlz_lib::BytesToString(data, 5, &result)); |
66 EXPECT_EQ(std::string("1E002167FF"), result); | 66 EXPECT_EQ(std::string("1E002167FF"), result); |
67 EXPECT_TRUE(rlz_lib::BytesToString(data, 4, &result)); | 67 EXPECT_TRUE(rlz_lib::BytesToString(data, 4, &result)); |
68 EXPECT_EQ(std::string("1E002167"), result); | 68 EXPECT_EQ(std::string("1E002167"), result); |
69 } | 69 } |
OLD | NEW |