Lines Matching refs:breaker
38 WordBreaker breaker; in TEST() local
39 breaker.setText(buf, NELEM(buf)); in TEST()
40 EXPECT_EQ(0, breaker.current()); in TEST()
41 EXPECT_EQ(6, breaker.followingWithLocale(Locale("en-US"), 0)); // after "hello " in TEST()
42 EXPECT_EQ(0, breaker.wordStart()); // "hello" in TEST()
43 EXPECT_EQ(5, breaker.wordEnd()); in TEST()
44 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
45 EXPECT_EQ(6, breaker.current()); in TEST()
46 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
47 EXPECT_EQ(6, breaker.wordStart()); // "world" in TEST()
48 EXPECT_EQ(11, breaker.wordEnd()); in TEST()
49 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
50 EXPECT_EQ(11, breaker.current()); in TEST()
55 WordBreaker breaker; in TEST() local
56 breaker.setText(buf, NELEM(buf)); in TEST()
57 EXPECT_EQ(0, breaker.current()); in TEST()
59 EXPECT_EQ(7, breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
60 EXPECT_EQ(0, breaker.wordStart()); // "hel{SOFT HYPHEN}lo" in TEST()
61 EXPECT_EQ(6, breaker.wordEnd()); in TEST()
62 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
63 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
64 EXPECT_EQ(7, breaker.wordStart()); // "world" in TEST()
65 EXPECT_EQ(12, breaker.wordEnd()); in TEST()
66 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
72 WordBreaker breaker; in TEST() local
73 breaker.setText(buf, NELEM(buf)); in TEST()
74 EXPECT_EQ(0, breaker.current()); in TEST()
75 EXPECT_EQ((ssize_t)NELEM(buf), breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
76 EXPECT_EQ(0, breaker.wordStart()); in TEST()
77 EXPECT_EQ((ssize_t)NELEM(buf), breaker.wordEnd()); in TEST()
78 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
83 WordBreaker breaker; in TEST() local
84 breaker.setText(buf, NELEM(buf)); in TEST()
85 EXPECT_EQ(0, breaker.current()); in TEST()
87 EXPECT_EQ(4, breaker.followingWithLocale(Locale("en-US"), 0)); // after CENT SIGN in TEST()
88 EXPECT_EQ(0, breaker.wordStart()); // "US¢" in TEST()
89 EXPECT_EQ(3, breaker.wordEnd()); in TEST()
91 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end of string in TEST()
92 EXPECT_EQ(4, breaker.wordStart()); // "JP¥" in TEST()
93 EXPECT_EQ((ssize_t)NELEM(buf), breaker.wordEnd()); in TEST()
98 WordBreaker breaker; in TEST() local
100 breaker.setText(buf, NELEM(buf)); in TEST()
101 EXPECT_EQ(0, breaker.current()); in TEST()
104 EXPECT_EQ((ssize_t)NELEM(buf), breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
105 EXPECT_EQ(0, breaker.wordStart()); in TEST()
106 EXPECT_EQ((ssize_t)NELEM(buf), breaker.wordEnd()); in TEST()
120 WordBreaker breaker; in TEST() local
121 breaker.setText(buf, NELEM(buf)); in TEST()
122 EXPECT_EQ(0, breaker.current()); in TEST()
124 EXPECT_EQ(7, breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
125 EXPECT_EQ(0, breaker.wordStart()); in TEST()
126 EXPECT_EQ(7, breaker.wordEnd()); in TEST()
127 EXPECT_EQ(17, breaker.next()); // after woman + zwj + heart + zwj + woman in TEST()
128 EXPECT_EQ(7, breaker.wordStart()); in TEST()
129 EXPECT_EQ(17, breaker.wordEnd()); in TEST()
130 EXPECT_EQ(22, breaker.next()); // after eye + zwj + left speech bubble in TEST()
131 EXPECT_EQ(17, breaker.wordStart()); in TEST()
132 EXPECT_EQ(22, breaker.wordEnd()); in TEST()
133 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
134 EXPECT_EQ(22, breaker.wordStart()); in TEST()
135 EXPECT_EQ(27, breaker.wordEnd()); in TEST()
144 WordBreaker breaker; in TEST() local
145 breaker.setText(buf, NELEM(buf)); in TEST()
146 EXPECT_EQ(0, breaker.current()); in TEST()
148 EXPECT_EQ(4, breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
149 EXPECT_EQ(0, breaker.wordStart()); in TEST()
150 EXPECT_EQ(4, breaker.wordEnd()); in TEST()
151 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
152 EXPECT_EQ(4, breaker.wordStart()); in TEST()
153 EXPECT_EQ(8, breaker.wordEnd()); in TEST()
168 WordBreaker breaker; in TEST() local
169 breaker.setText(buf, NELEM(buf)); in TEST()
170 EXPECT_EQ(0, breaker.current()); in TEST()
171 EXPECT_EQ(2, breaker.followingWithLocale(Locale("en"), 0)); in TEST()
172 EXPECT_EQ(0, breaker.wordStart()); in TEST()
173 EXPECT_EQ(2, breaker.wordEnd()); in TEST()
175 EXPECT_EQ(4, breaker.next()); in TEST()
176 EXPECT_EQ(2, breaker.wordStart()); in TEST()
177 EXPECT_EQ(4, breaker.wordEnd()); in TEST()
179 EXPECT_EQ(7, breaker.next()); in TEST()
180 EXPECT_EQ(4, breaker.wordStart()); in TEST()
181 EXPECT_EQ(7, breaker.wordEnd()); in TEST()
183 EXPECT_EQ(9, breaker.next()); in TEST()
184 EXPECT_EQ(7, breaker.wordStart()); in TEST()
185 EXPECT_EQ(9, breaker.wordEnd()); in TEST()
187 EXPECT_EQ(10, breaker.next()); in TEST()
188 EXPECT_EQ(9, breaker.wordStart()); in TEST()
189 EXPECT_EQ(10, breaker.wordEnd()); in TEST()
191 EXPECT_EQ(12, breaker.next()); in TEST()
192 EXPECT_EQ(10, breaker.wordStart()); in TEST()
193 EXPECT_EQ(12, breaker.wordEnd()); in TEST()
195 EXPECT_EQ(14, breaker.next()); in TEST()
196 EXPECT_EQ(12, breaker.wordStart()); in TEST()
197 EXPECT_EQ(14, breaker.wordEnd()); in TEST()
199 EXPECT_EQ(16, breaker.next()); in TEST()
200 EXPECT_EQ(14, breaker.wordStart()); in TEST()
201 EXPECT_EQ(16, breaker.wordEnd()); in TEST()
215 WordBreaker breaker; in TEST() local
216 breaker.setText(buf, size); in TEST()
217 EXPECT_EQ(0, breaker.current()); in TEST()
219 EXPECT_EQ(kFlagLength, breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
220 EXPECT_EQ(0, breaker.wordStart()); in TEST()
221 EXPECT_EQ(kFlagLength, breaker.wordEnd()); in TEST()
222 EXPECT_EQ(static_cast<ssize_t>(size), breaker.next()); in TEST()
223 EXPECT_EQ(kFlagLength, breaker.wordStart()); in TEST()
224 EXPECT_EQ(kFlagLength * 2, breaker.wordEnd()); in TEST()
240 WordBreaker breaker; in TEST() local
241 breaker.setText(buf, size); in TEST()
242 EXPECT_EQ(0, breaker.current()); in TEST()
244 EXPECT_EQ(kFlagLength, breaker.followingWithLocale(Locale("en-US"), 0)); in TEST()
245 EXPECT_EQ(0, breaker.wordStart()); in TEST()
246 EXPECT_EQ(kFlagLength, breaker.wordEnd()); in TEST()
247 EXPECT_EQ(static_cast<ssize_t>(size), breaker.next()); in TEST()
248 EXPECT_EQ(kFlagLength, breaker.wordStart()); in TEST()
249 EXPECT_EQ(kFlagLength * 2, breaker.wordEnd()); in TEST()
255 WordBreaker breaker; in TEST() local
256 breaker.setText(buf, NELEM(buf)); in TEST()
257 EXPECT_EQ(0, breaker.current()); in TEST()
258 EXPECT_EQ(9, breaker.followingWithLocale(Locale("en-US"), 0)); // after "¡¡hello, " in TEST()
259 EXPECT_EQ(2, breaker.wordStart()); // "hello" in TEST()
260 EXPECT_EQ(7, breaker.wordEnd()); in TEST()
261 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
262 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
263 EXPECT_EQ(9, breaker.wordStart()); // "world" in TEST()
264 EXPECT_EQ(14, breaker.wordEnd()); in TEST()
265 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
271 WordBreaker breaker; in TEST() local
272 breaker.setText(buf, NELEM(buf)); in TEST()
273 EXPECT_EQ(0, breaker.current()); in TEST()
274 EXPECT_EQ(11, breaker.followingWithLocale(Locale("en-US"), 0)); // after "foo@example" in TEST()
275 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
276 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
277 EXPECT_EQ(16, breaker.next()); // after ".com " in TEST()
278 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
279 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
280 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
281 EXPECT_EQ(16, breaker.wordStart()); // "x" in TEST()
282 EXPECT_EQ(17, breaker.wordEnd()); in TEST()
283 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
289 WordBreaker breaker; in TEST() local
290 breaker.setText(buf, NELEM(buf)); in TEST()
291 EXPECT_EQ(0, breaker.current()); in TEST()
292 EXPECT_EQ(7, breaker.followingWithLocale(Locale("en-US"), 0)); // after "mailto:" in TEST()
293 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
294 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
295 EXPECT_EQ(18, breaker.next()); // after "foo@example" in TEST()
296 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
297 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
298 EXPECT_EQ(23, breaker.next()); // after ".com " in TEST()
299 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
300 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
301 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
302 EXPECT_EQ(23, breaker.wordStart()); // "x" in TEST()
303 EXPECT_EQ(24, breaker.wordEnd()); in TEST()
304 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
312 WordBreaker breaker; in TEST() local
313 breaker.setText(buf, NELEM(buf)); in TEST()
314 EXPECT_EQ(0, breaker.current()); in TEST()
315 EXPECT_EQ(11, breaker.followingWithLocale(Locale("en-US"), 0)); // after "foo@example" in TEST()
316 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
317 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
318 EXPECT_EQ(15, breaker.next()); // after ".com" in TEST()
319 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
320 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
321 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
322 EXPECT_EQ(15, breaker.wordStart()); // "一" in TEST()
323 EXPECT_EQ(16, breaker.wordEnd()); in TEST()
324 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
330 WordBreaker breaker; in TEST() local
331 breaker.setText(buf, NELEM(buf)); in TEST()
332 EXPECT_EQ(0, breaker.current()); in TEST()
333 EXPECT_EQ(11, breaker.followingWithLocale(Locale("en-US"), 0)); // after "foo@example" in TEST()
334 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
335 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
336 EXPECT_EQ(17, breaker.next()); // after ".com̃ " in TEST()
337 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
338 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
339 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
340 EXPECT_EQ(17, breaker.wordStart()); // "x" in TEST()
341 EXPECT_EQ(18, breaker.wordEnd()); in TEST()
342 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
347 WordBreaker breaker; in TEST() local
348 breaker.setText(buf, NELEM(buf)); in TEST()
349 EXPECT_EQ(0, breaker.current()); in TEST()
350 EXPECT_EQ(2, breaker.followingWithLocale(Locale("en-US"), 0)); // after "a " in TEST()
351 EXPECT_EQ(0, breaker.wordStart()); // "a" in TEST()
352 EXPECT_EQ(1, breaker.wordEnd()); in TEST()
353 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
354 EXPECT_EQ(4, breaker.next()); // after "@ " in TEST()
355 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
356 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
357 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
358 EXPECT_EQ(4, breaker.wordStart()); // "b" in TEST()
359 EXPECT_EQ(5, breaker.wordEnd()); in TEST()
360 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
366 WordBreaker breaker; in TEST() local
367 breaker.setText(buf, NELEM(buf)); in TEST()
368 EXPECT_EQ(0, breaker.current()); in TEST()
369 EXPECT_EQ(5, breaker.followingWithLocale(Locale("en-US"), 0)); // after "http:" in TEST()
370 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
371 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
372 EXPECT_EQ(7, breaker.next()); // after "//" in TEST()
373 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
374 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
375 EXPECT_EQ(14, breaker.next()); // after "example" in TEST()
376 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
377 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
378 EXPECT_EQ(19, breaker.next()); // after ".com " in TEST()
379 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
380 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
381 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
382 EXPECT_EQ(19, breaker.wordStart()); // "x" in TEST()
383 EXPECT_EQ(20, breaker.wordEnd()); in TEST()
384 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
392 WordBreaker breaker; in TEST() local
393 breaker.setText(buf, NELEM(buf)); in TEST()
394 EXPECT_EQ(0, breaker.current()); in TEST()
395 EXPECT_EQ(5, breaker.followingWithLocale(Locale("en-US"), 0)); // after "http:" in TEST()
396 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
397 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
398 EXPECT_EQ(7, breaker.next()); // after "//" in TEST()
399 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
400 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
401 EXPECT_EQ(8, breaker.next()); // after "a" in TEST()
402 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
403 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
404 EXPECT_EQ(10, breaker.next()); // after ".b" in TEST()
405 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
406 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
407 EXPECT_EQ(11, breaker.next()); // after "/" in TEST()
408 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
409 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
410 EXPECT_EQ(13, breaker.next()); // after "~c" in TEST()
411 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
412 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
413 EXPECT_EQ(15, breaker.next()); // after ",d" in TEST()
414 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
415 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
416 EXPECT_EQ(17, breaker.next()); // after "-e" in TEST()
417 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
418 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
419 EXPECT_EQ(19, breaker.next()); // after "?f" in TEST()
420 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
421 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
422 EXPECT_EQ(20, breaker.next()); // after "=" in TEST()
423 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
424 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
425 EXPECT_EQ(21, breaker.next()); // after "g" in TEST()
426 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
427 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
428 EXPECT_EQ(22, breaker.next()); // after "&" in TEST()
429 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
430 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
431 EXPECT_EQ(23, breaker.next()); // after "h" in TEST()
432 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
433 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
434 EXPECT_EQ(25, breaker.next()); // after "#i" in TEST()
435 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
436 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
437 EXPECT_EQ(27, breaker.next()); // after "%j" in TEST()
438 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
439 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
440 EXPECT_EQ(29, breaker.next()); // after "_k" in TEST()
441 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
442 EXPECT_EQ(1, breaker.breakBadness()); in TEST()
443 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
444 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
445 EXPECT_EQ(0, breaker.breakBadness()); in TEST()
450 WordBreaker breaker; in TEST() local
451 breaker.setText(buf, NELEM(buf)); in TEST()
452 EXPECT_EQ(0, breaker.current()); in TEST()
453 EXPECT_EQ(5, breaker.followingWithLocale(Locale("en-US"), 0)); // after "http:" in TEST()
454 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
455 EXPECT_EQ(7, breaker.next()); // after "//" in TEST()
456 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
457 EXPECT_EQ(8, breaker.next()); // after "a" in TEST()
458 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
459 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
460 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
465 WordBreaker breaker; in TEST() local
466 breaker.setText(buf, NELEM(buf)); in TEST()
467 EXPECT_EQ(0, breaker.current()); in TEST()
468 EXPECT_EQ(5, breaker.followingWithLocale(Locale("en-US"), 0)); // after "http:" in TEST()
469 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
470 EXPECT_EQ(7, breaker.next()); // after "//" in TEST()
471 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
472 EXPECT_EQ(8, breaker.next()); // after "a" in TEST()
473 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
474 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST()
475 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
480 WordBreaker breaker; in TEST() local
481 breaker.setText(buf, NELEM(buf)); in TEST()
482 EXPECT_EQ(0, breaker.current()); in TEST()
483 EXPECT_EQ((ssize_t)NELEM(buf), breaker.followingWithLocale(Locale("en-US"), 0)); // end in TEST()
484 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
489 WordBreaker breaker; in TEST() local
490 breaker.setText(buf.data(), buf.size()); in TEST()
491 EXPECT_EQ(0, breaker.current()); in TEST()
492 EXPECT_EQ(6, breaker.followingWithLocale(Locale("en-US"), 0)); // after "Hello " in TEST()
493 EXPECT_EQ(0, breaker.wordStart()); in TEST()
494 EXPECT_EQ(5, breaker.wordEnd()); in TEST()
496 EXPECT_EQ(6, breaker.current()); in TEST()
497 EXPECT_EQ(11, breaker.next()); // after "http:" in TEST()
500 EXPECT_EQ(11, breaker.followingWithLocale(Locale("en-US"), 6)); // after "http:" in TEST()
501 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
503 EXPECT_EQ(13, breaker.next()); // after "//" in TEST()
504 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
507 EXPECT_EQ(13, breaker.followingWithLocale(Locale("en-US"), 12)); // after "//" in TEST()
508 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
509 EXPECT_EQ(16, breaker.next()); // after "abc" in TEST()
510 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
511 EXPECT_EQ(18, breaker.next()); // after "/d" in TEST()
512 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
513 EXPECT_EQ(24, breaker.next()); // after ".html" in TEST()
514 EXPECT_TRUE(breaker.wordStart() >= breaker.wordEnd()); in TEST()
516 EXPECT_EQ(29, breaker.next()); // after "World" in TEST()
517 EXPECT_EQ(24, breaker.wordStart()); in TEST()
518 EXPECT_EQ(29, breaker.wordEnd()); in TEST()
537 WordBreaker breaker; in TEST() local
538 breaker.setText(buf.data(), buf.size()); in TEST()
540 EXPECT_EQ(0, breaker.current()); in TEST()
541 EXPECT_EQ(2, breaker.followingWithLocale(Locale("en-US"), 0)); // after "a " in TEST()
542 EXPECT_EQ(0, breaker.wordStart()); in TEST()
543 EXPECT_EQ(1, breaker.wordEnd()); in TEST()
545 EXPECT_EQ(2, breaker.current()); in TEST()
546 EXPECT_EQ(3, breaker.next()); // after CHAR_SPACE character. in TEST()
547 EXPECT_EQ(2, breaker.wordStart()); in TEST()
548 EXPECT_EQ(2, breaker.wordEnd()); in TEST()
550 EXPECT_EQ(3, breaker.current()); in TEST()
551 EXPECT_EQ(4, breaker.next()); // after sp character. in TEST()
552 EXPECT_EQ(3, breaker.wordStart()); in TEST()
553 EXPECT_EQ(4, breaker.wordEnd()); in TEST()
576 EXPECT_NE(nullptr, enUSBreaker.breaker.get()); in TEST()
577 EXPECT_NE(nullptr, enUSBreaker2.breaker.get()); in TEST()
578 EXPECT_NE(nullptr, frFRBreaker.breaker.get()); in TEST()
580 EXPECT_NE(enUSBreaker.breaker.get(), enUSBreaker2.breaker.get()); in TEST()
581 EXPECT_NE(enUSBreaker.breaker.get(), frFRBreaker.breaker.get()); in TEST()
582 EXPECT_NE(enUSBreaker2.breaker.get(), frFRBreaker.breaker.get()); in TEST()
599 icu::BreakIterator* enUSBreakerPtr = enUSBreaker.breaker.get(); in TEST()
602 EXPECT_EQ(nullptr, enUSBreaker.breaker.get()); in TEST()
606 EXPECT_NE(enUSBreakerPtr, frFRBreaker.breaker.get()); in TEST()
611 EXPECT_EQ(enUSBreakerPtr, enUSBreaker2.breaker.get()); in TEST()