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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SymbolsIteratorTest.cpp

Issue 2807913002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "platform/fonts/SymbolsIterator.h" 5 #include "platform/fonts/SymbolsIterator.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include <string> 8 #include <string>
9 9
10 namespace blink { 10 namespace blink {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 #define CHECK_RUNS(...) \ 59 #define CHECK_RUNS(...) \
60 DECLARE_RUNSVECTOR(__VA_ARGS__); \ 60 DECLARE_RUNSVECTOR(__VA_ARGS__); \
61 CheckRuns(runs); 61 CheckRuns(runs);
62 62
63 TEST_F(SymbolsIteratorTest, Empty) { 63 TEST_F(SymbolsIteratorTest, Empty) {
64 String empty(emptyString16Bit); 64 String empty(emptyString16Bit);
65 SymbolsIterator symbolsIterator(empty.characters16(), empty.length()); 65 SymbolsIterator symbolsIterator(empty.characters16(), empty.length());
66 unsigned limit = 0; 66 unsigned limit = 0;
67 FontFallbackPriority symbolsFont = FontFallbackPriority::Invalid; 67 FontFallbackPriority symbolsFont = FontFallbackPriority::Invalid;
68 ASSERT(!symbolsIterator.consume(&limit, &symbolsFont)); 68 DCHECK(!symbolsIterator.consume(&limit, &symbolsFont));
69 ASSERT_EQ(limit, 0u); 69 ASSERT_EQ(limit, 0u);
70 ASSERT_EQ(symbolsFont, FontFallbackPriority::Invalid); 70 ASSERT_EQ(symbolsFont, FontFallbackPriority::Invalid);
71 } 71 }
72 72
73 TEST_F(SymbolsIteratorTest, Space) { 73 TEST_F(SymbolsIteratorTest, Space) {
74 CHECK_RUNS({{" ", FontFallbackPriority::Text}}); 74 CHECK_RUNS({{" ", FontFallbackPriority::Text}});
75 } 75 }
76 76
77 TEST_F(SymbolsIteratorTest, Latin) { 77 TEST_F(SymbolsIteratorTest, Latin) {
78 CHECK_RUNS({{"Aa", FontFallbackPriority::Text}}); 78 CHECK_RUNS({{"Aa", FontFallbackPriority::Text}});
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 TEST_F(SymbolsIteratorTest, Arrows) { 214 TEST_F(SymbolsIteratorTest, Arrows) {
215 CHECK_RUNS({{"x→←x←↑↓→", FontFallbackPriority::Text}}); 215 CHECK_RUNS({{"x→←x←↑↓→", FontFallbackPriority::Text}});
216 } 216 }
217 217
218 TEST_F(SymbolsIteratorTest, JudgePilot) { 218 TEST_F(SymbolsIteratorTest, JudgePilot) {
219 CHECK_RUNS({{"👨‍⚖️👩‍⚖️👨🏼‍⚖️👩🏼‍⚖️", 219 CHECK_RUNS({{"👨‍⚖️👩‍⚖️👨🏼‍⚖️👩🏼‍⚖️",
220 FontFallbackPriority::EmojiEmoji}}); 220 FontFallbackPriority::EmojiEmoji}});
221 } 221 }
222 222
223 } // namespace blink 223 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698