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

Side by Side Diff: third_party/WebKit/Source/platform/wtf/text/TextCodecICUTest.cpp

Issue 2771783003: Move wtf_unittests to platform/wtf/. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "wtf/text/TextCodecICU.h" 5 #include "platform/wtf/text/TextCodecICU.h"
6 6
7 #include "platform/wtf/Vector.h"
8 #include "platform/wtf/text/CharacterNames.h"
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 #include "wtf/Vector.h"
9 #include "wtf/text/CharacterNames.h"
10 10
11 namespace WTF { 11 namespace WTF {
12 12
13 TEST(TextCodecICUTest, IgnorableCodePoint) { 13 TEST(TextCodecICUTest, IgnorableCodePoint) {
14 TextEncoding iso2022jp("iso-2022-jp"); 14 TextEncoding iso2022jp("iso-2022-jp");
15 std::unique_ptr<TextCodec> codec = TextCodecICU::create(iso2022jp, nullptr); 15 std::unique_ptr<TextCodec> codec = TextCodecICU::create(iso2022jp, nullptr);
16 Vector<UChar> source; 16 Vector<UChar> source;
17 source.push_back('a'); 17 source.push_back('a');
18 source.push_back(zeroWidthJoinerCharacter); 18 source.push_back(zeroWidthJoinerCharacter);
19 CString encoded = 19 CString encoded =
(...skipping 29 matching lines...) Expand all
49 EXPECT_STREQ("", encoded.data()); 49 EXPECT_STREQ("", encoded.data());
50 } 50 }
51 { 51 {
52 CString encoded = codec->encode(poo, WTF_ARRAY_LENGTH(poo), 52 CString encoded = codec->encode(poo, WTF_ARRAY_LENGTH(poo),
53 QuestionMarksForUnencodables); 53 QuestionMarksForUnencodables);
54 EXPECT_STREQ(expected.data(), encoded.data()); 54 EXPECT_STREQ(expected.data(), encoded.data());
55 } 55 }
56 } 56 }
57 } 57 }
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698