Revive ForwardDeleteTest with updating expectations
In Unicode 11, the emoji category is reorganized and some sequences are now treated as single grapheme clusters. Bug: 111299224 Test: atest FrameworksCoreTests:ForwardDeleteTest Change-Id: Id078c9f6dfa79eee76af3ac40f10c8ce53c52278
This commit is contained in:
@@ -20,7 +20,6 @@ import android.platform.test.annotations.Presubmit;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.filters.SmallTest;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import android.test.suitebuilder.annotation.Suppress;
|
||||
import android.text.InputType;
|
||||
import android.util.KeyUtils;
|
||||
import android.view.KeyEvent;
|
||||
@@ -239,7 +238,6 @@ public class ForwardDeleteTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Suppress
|
||||
public void testEmojiModifier() {
|
||||
EditorState state = new EditorState();
|
||||
|
||||
@@ -256,20 +254,15 @@ public class ForwardDeleteTest {
|
||||
// Isolated multiple emoji modifier
|
||||
state.setByString("| U+1F3FB U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("| U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("|");
|
||||
|
||||
// Multiple emoji modifiers
|
||||
state.setByString("| U+1F466 U+1F3FB U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("| U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("|");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Suppress
|
||||
public void testMixedEdgeCases() {
|
||||
EditorState state = new EditorState();
|
||||
|
||||
@@ -318,7 +311,7 @@ public class ForwardDeleteTest {
|
||||
// COMBINING ENCLOSING KEYCAP + emoji modifier
|
||||
state.setByString("| '1' U+20E3 U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("| U+1F3FB");
|
||||
state.assertEquals("|");
|
||||
|
||||
// Emoji modifier + COMBINING ENCLOSING KEYCAP
|
||||
state.setByString("| U+1F466 U+1F3FB U+20E3");
|
||||
@@ -360,7 +353,7 @@ public class ForwardDeleteTest {
|
||||
// Variation selector + emoji modifier
|
||||
state.setByString("| U+2665 U+FE0F U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("| U+1F3FB");
|
||||
state.assertEquals("|");
|
||||
|
||||
// Emoji modifier + variation selector
|
||||
state.setByString("| U+1F466 U+1F3FB U+FE0F");
|
||||
@@ -396,7 +389,7 @@ public class ForwardDeleteTest {
|
||||
// Start with ZERO WIDTH JOINER + emoji modifier
|
||||
state.setByString("| U+200D U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("| U+1F3FB");
|
||||
state.assertEquals("|");
|
||||
|
||||
// ZERO WIDTH JOINER + emoji modifier
|
||||
state.setByString("| U+1F469 U+200D U+1F3FB");
|
||||
@@ -418,8 +411,6 @@ public class ForwardDeleteTest {
|
||||
// Regional indicator symbol + emoji modifier
|
||||
state.setByString("| U+1F1FA U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("| U+1F3FB");
|
||||
forwardDelete(state, 0);
|
||||
state.assertEquals("|");
|
||||
|
||||
// Emoji modifier + regional indicator symbol
|
||||
|
||||
Reference in New Issue
Block a user