Lines Matching refs:text

45     std::vector<uint16_t> text(CHAR_COUNT, 'a');  in TEST()  local
48 builder.build(text, true /* compute hyphenation */, false /* compute full layout */, in TEST()
61 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
67 builder.addStyleRun(0, text.size(), std::move(paint), false /* is RTL */); in TEST()
68 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
71 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
72 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
73 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
74 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(1, 2))); in TEST()
75 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 130.0f, 0.0f), mt->getBounds(text, Range(0, text.size()))); in TEST()
79 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
89 builder.addStyleRun(helloLength, text.size(), std::move(paint2), false /* is RTL */); in TEST()
90 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
93 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
94 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
95 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
96 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(1, 2))); in TEST()
97 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(7, 7))); in TEST()
98 EXPECT_EQ(MinikinRect(0.0f, 20.0f, 20.0f, 0.0f), mt->getBounds(text, Range(7, 8))); in TEST()
99 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 30.0f, 0.0f), mt->getBounds(text, Range(6, 8))); in TEST()
100 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 190.0f, 0.0f), mt->getBounds(text, Range(0, text.size()))); in TEST()
104 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
110 builder.addStyleRun(0, text.size(), std::move(paint), false /* is RTL */); in TEST()
111 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
114 EXPECT_EQ(MinikinExtent(0.0f, 0.0f), mt->getExtent(text, Range(0, 0))); in TEST()
115 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(0, 1))); in TEST()
116 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(0, 2))); in TEST()
117 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(1, 2))); in TEST()
118 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(0, text.size()))); in TEST()
122 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
132 builder.addStyleRun(helloLength, text.size(), std::move(paint2), false /* is RTL */); in TEST()
133 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
136 EXPECT_EQ(MinikinExtent(0.0f, 0.0f), mt->getExtent(text, Range(0, 0))); in TEST()
137 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(0, 1))); in TEST()
138 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(0, 2))); in TEST()
139 EXPECT_EQ(MinikinExtent(-80.0f, 20.0f), mt->getExtent(text, Range(1, 2))); in TEST()
140 EXPECT_EQ(MinikinExtent(0.0f, 0.0f), mt->getExtent(text, Range(7, 7))); in TEST()
141 EXPECT_EQ(MinikinExtent(-160.0f, 40.0f), mt->getExtent(text, Range(7, 8))); in TEST()
142 EXPECT_EQ(MinikinExtent(-160.0f, 40.0f), mt->getExtent(text, Range(6, 8))); in TEST()
143 EXPECT_EQ(MinikinExtent(-160.0f, 40.0f), mt->getExtent(text, Range(0, text.size()))); in TEST()
147 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
149 Range fullContext(0, text.size()); in TEST()
154 builder.addStyleRun(0, text.size(), std::move(paint), false /* is RTL */); in TEST()
155 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
161 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, samePaint, in TEST()
165 layout = mt->buildLayout(text, Range(0, 1), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
176 layout = mt->buildLayout(text, Range(0, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
190 layout = mt->buildLayout(text, Range(1, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
201 layout = mt->buildLayout(text, Range(0, text.size()), fullContext, samePaint, in TEST()
203 ASSERT_EQ(text.size(), layout.nGlyphs()); in TEST()
205 for (uint32_t i = 0; i < text.size(); ++i) { in TEST()
212 EXPECT_EQ(text.size(), layout.getAdvances().size()); in TEST()
217 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
220 Range fullContext(0, text.size()); in TEST()
228 builder.addStyleRun(helloLength, text.size(), std::move(paint2), false /* is RTL */); in TEST()
229 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
235 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, samePaint, in TEST()
239 layout = mt->buildLayout(text, Range(0, 1), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
250 layout = mt->buildLayout(text, Range(0, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
264 layout = mt->buildLayout(text, Range(1, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
275 layout = mt->buildLayout(text, Range(7, 7), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
281 layout = mt->buildLayout(text, Range(7, 8), fullContext, samePaint2, StartHyphenEdit::NO_EDIT, in TEST()
294 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
296 Range fullContext(0, text.size()); in TEST()
301 builder.addStyleRun(0, text.size(), std::move(paint), false /* is RTL */); in TEST()
302 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
308 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, differentPaint, in TEST()
312 layout = mt->buildLayout(text, Range(0, 1), fullContext, differentPaint, in TEST()
323 layout = mt->buildLayout(text, Range(0, 2), fullContext, differentPaint, in TEST()
337 layout = mt->buildLayout(text, Range(1, 2), fullContext, differentPaint, in TEST()
348 layout = mt->buildLayout(text, Range(0, text.size()), fullContext, differentPaint, in TEST()
350 ASSERT_EQ(text.size(), layout.nGlyphs()); in TEST()
352 for (uint32_t i = 0; i < text.size(); ++i) { in TEST()
359 EXPECT_EQ(text.size(), layout.getAdvances().size()); in TEST()
364 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
367 Range fullContext(0, text.size()); in TEST()
375 builder.addStyleRun(helloLength, text.size(), std::move(paint2), false /* is RTL */); in TEST()
376 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
382 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, differentPaint, in TEST()
386 layout = mt->buildLayout(text, Range(0, 1), fullContext, differentPaint, in TEST()
397 layout = mt->buildLayout(text, Range(0, 2), fullContext, differentPaint, in TEST()
411 layout = mt->buildLayout(text, Range(1, 2), fullContext, differentPaint, in TEST()
422 layout = mt->buildLayout(text, Range(7, 7), fullContext, differentPaint, in TEST()
426 layout = mt->buildLayout(text, Range(7, 8), fullContext, differentPaint, in TEST()
437 layout = mt->buildLayout(text, Range(6, 8), fullContext, differentPaint, in TEST()
451 layout = mt->buildLayout(text, Range(0, text.size()), fullContext, differentPaint, in TEST()
453 ASSERT_EQ(text.size(), layout.nGlyphs()); in TEST()
455 for (uint32_t i = 0; i < text.size(); ++i) { in TEST()
462 EXPECT_EQ(text.size(), layout.getAdvances().size()); in TEST()