Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: third_party/WebKit/Source/wtf/text/TextCodecUTF8Test.cpp

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp ('k') | third_party/WebKit/Source/wtf/text/TextCodecUserDefined.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698