| Index: third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp
|
| index 66fe49f047d799904a41e5ba557ffad0ea986a26..b1cec029ae05ec1d53916edc3ab3f34d90121336 100644
|
| --- a/third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp
|
| +++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp
|
| @@ -41,52 +41,51 @@ namespace WTF {
|
|
|
| namespace {
|
|
|
| -TEST(TextCodecUTF8, DecodeAscii)
|
| -{
|
| - TextEncoding encoding("UTF-8");
|
| - OwnPtr<TextCodec> codec(newTextCodec(encoding));
|
| +TEST(TextCodecUTF8, DecodeAscii) {
|
| + TextEncoding encoding("UTF-8");
|
| + OwnPtr<TextCodec> codec(newTextCodec(encoding));
|
|
|
| - const char testCase[] = "HelloWorld";
|
| - size_t testCaseSize = sizeof(testCase) - 1;
|
| + const char testCase[] = "HelloWorld";
|
| + size_t testCaseSize = sizeof(testCase) - 1;
|
|
|
| - bool sawError = false;
|
| - const String& result = codec->decode(testCase, testCaseSize, DataEOF, false, sawError);
|
| - EXPECT_FALSE(sawError);
|
| - ASSERT_EQ(testCaseSize, result.length());
|
| - for (size_t i = 0; i < testCaseSize; ++i) {
|
| - EXPECT_EQ(testCase[i], result[i]);
|
| - }
|
| + bool sawError = false;
|
| + const String& result =
|
| + codec->decode(testCase, testCaseSize, DataEOF, false, sawError);
|
| + EXPECT_FALSE(sawError);
|
| + ASSERT_EQ(testCaseSize, result.length());
|
| + for (size_t i = 0; i < testCaseSize; ++i) {
|
| + EXPECT_EQ(testCase[i], result[i]);
|
| + }
|
| }
|
|
|
| -TEST(TextCodecUTF8, DecodeChineseCharacters)
|
| -{
|
| - TextEncoding encoding("UTF-8");
|
| - OwnPtr<TextCodec> codec(newTextCodec(encoding));
|
| +TEST(TextCodecUTF8, DecodeChineseCharacters) {
|
| + TextEncoding encoding("UTF-8");
|
| + OwnPtr<TextCodec> codec(newTextCodec(encoding));
|
|
|
| - // "Kanji" in Chinese characters.
|
| - const char testCase[] = "\xe6\xbc\xa2\xe5\xad\x97";
|
| - size_t testCaseSize = sizeof(testCase) - 1;
|
| + // "Kanji" in Chinese characters.
|
| + const char testCase[] = "\xe6\xbc\xa2\xe5\xad\x97";
|
| + size_t testCaseSize = sizeof(testCase) - 1;
|
|
|
| - bool sawError = false;
|
| - const String& result = codec->decode(testCase, testCaseSize, DataEOF, false, sawError);
|
| - EXPECT_FALSE(sawError);
|
| - ASSERT_EQ(2u, result.length());
|
| - EXPECT_EQ(0x6f22U, result[0]);
|
| - EXPECT_EQ(0x5b57U, result[1]);
|
| + bool sawError = false;
|
| + const String& result =
|
| + codec->decode(testCase, testCaseSize, DataEOF, false, sawError);
|
| + EXPECT_FALSE(sawError);
|
| + ASSERT_EQ(2u, result.length());
|
| + EXPECT_EQ(0x6f22U, result[0]);
|
| + EXPECT_EQ(0x5b57U, result[1]);
|
| }
|
|
|
| -TEST(TextCodecUTF8, Decode0xFF)
|
| -{
|
| - TextEncoding encoding("UTF-8");
|
| - OwnPtr<TextCodec> codec(newTextCodec(encoding));
|
| +TEST(TextCodecUTF8, Decode0xFF) {
|
| + TextEncoding encoding("UTF-8");
|
| + OwnPtr<TextCodec> codec(newTextCodec(encoding));
|
|
|
| - bool sawError = false;
|
| - const String& result = codec->decode("\xff", 1, DataEOF, false, sawError);
|
| - EXPECT_TRUE(sawError);
|
| - ASSERT_EQ(1u, result.length());
|
| - EXPECT_EQ(0xFFFDU, result[0]);
|
| + bool sawError = false;
|
| + const String& result = codec->decode("\xff", 1, DataEOF, false, sawError);
|
| + EXPECT_TRUE(sawError);
|
| + ASSERT_EQ(1u, result.length());
|
| + EXPECT_EQ(0xFFFDU, result[0]);
|
| }
|
|
|
| -} // namespace
|
| +} // namespace
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|