| Index: base/string_util_unittest.cc
|
| ===================================================================
|
| --- base/string_util_unittest.cc (revision 8370)
|
| +++ base/string_util_unittest.cc (working copy)
|
| @@ -1422,3 +1422,11 @@
|
| EXPECT_TRUE(output == cases[i].output);
|
| }
|
| }
|
| +
|
| +TEST(StringUtilTest, HexEncode) {
|
| + std::string hex(HexEncode(NULL, 0));
|
| + EXPECT_EQ(hex.length(), 0U);
|
| + unsigned char bytes[] = {0x01, 0xff, 0x02, 0xfe, 0x03};
|
| + hex = HexEncode(bytes, sizeof(bytes));
|
| + EXPECT_EQ(hex.compare("01FF02FE03"), 0);
|
| +}
|
|
|