Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fbf85b0 authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

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
parent 5f0e4365
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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