Update unit tests for forward delete

Changes in the definition of grapheme boundaries for emoji (which
now relies more on what actually ligates in a font) need updating the
unit tests. The changes in the unit tests are cases where the old
code in Minikin assumed a single grapheme, but the new code looks in
the font and finds that there are two grapheme clusters indeed.

Change-Id: Icd3d2563776fb295f48e70b67a8af8e6bd3f4b38
Fixes: 37769578
Test: updated tests pass
This commit is contained in:
Roozbeh Pournader
2017-05-02 18:33:12 -07:00
parent 5f0e436548
commit 4fbf85b02f

View File

@@ -354,6 +354,8 @@ public class ForwardDeleteTest extends KeyListenerTestCase {
// ZERO WIDTH JOINER + regional indicator symbol
state.setByString("| U+1F469 U+200D U+1F1FA");
forwardDelete(state, 0);
state.assertEquals("| U+1F1FA");
forwardDelete(state, 0);
state.assertEquals("|");
// Regional indicator symbol + end with ZERO WIDTH JOINER
@@ -364,6 +366,8 @@ public class ForwardDeleteTest extends KeyListenerTestCase {
// Regional indicator symbol + ZERO WIDTH JOINER
state.setByString("| U+1F1FA U+200D U+1F469");
forwardDelete(state, 0);
state.assertEquals("| U+1F469");
forwardDelete(state, 0);
state.assertEquals("|");
// Start with ZERO WIDTH JOINER + emoji modifier
@@ -384,6 +388,8 @@ public class ForwardDeleteTest extends KeyListenerTestCase {
// Emoji modifier + ZERO WIDTH JOINER
state.setByString("| U+1F466 U+1F3FB U+200D U+1F469");
forwardDelete(state, 0);
state.assertEquals("| U+1F469");
forwardDelete(state, 0);
state.assertEquals("|");
// Regional indicator symbol + emoji modifier