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

Commit dc4ffc0a authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

Expect hasGlyph support for text presentation sequences

In I9660ec43aeee84303cfb825352a7f5029d036dd6, the code was changed
for hasGlyph to always return true for text presentation sequences if
the font supported the base character, but the core tests were
missed.

Change-Id: I6112337df93b14d1fcba5febdef1fdd9c60105bf
Fixes: 62417257
Test: adb shell am instrument -w -e package android.graphics com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
parent eed27590
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -148,7 +148,10 @@ public class PaintTest extends InstrumentationTestCase {
                        " U+" + Integer.toHexString(vs) + ")";
                final String testString =
                        codePointsToString(new int[] {testCase.mBaseCodepoint, vs});
                if (testCase.mVariationSelectors.contains(vs)) {
                if (vs == 0xFE0E // U+FE0E is the text presentation emoji. hasGlyph is expected to
                                 // return true for that variation selector if the font has the base
                                 // glyph.
                             || testCase.mVariationSelectors.contains(vs)) {
                    assertTrue(signature + " is expected to be true", p.hasGlyph(testString));
                } else {
                    assertFalse(signature + " is expected to be false", p.hasGlyph(testString));