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

Commit 699a49b9 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Follow up API signature changes of CursorAnchorInfo part 2

This is another follow up CL for Ic8c6fab58c01206872a34e7e.

Ib2371849d32bb44da9ef59f05e648a476e03699a didn't cover
following renamings.  This CL fixes them.

- #getCharacterRect -> #getCharacterBounds
- #getCharacterRectFlags -> #getCharacterBoundsFlags

BUG: 17365414
Change-Id: I120795da3f25f1e2fa71f455f92e3cd1c036c1d5
parent e04c75eb
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
@@ -116,16 +116,16 @@ public class CursorAnchorInfoTest extends InstrumentationTestCase {
        assertEquals(TRANSFORM_MATRIX, info.getMatrix());
        for (int i = 0; i < MANY_BOUNDS.length; i++) {
            final RectF expectedBounds = MANY_BOUNDS[i];
            assertEquals(expectedBounds, info.getCharacterRect(i));
            assertEquals(expectedBounds, info.getCharacterBounds(i));
        }
        assertNull(info.getCharacterRect(-1));
        assertNull(info.getCharacterRect(MANY_BOUNDS.length + 1));
        assertNull(info.getCharacterBounds(-1));
        assertNull(info.getCharacterBounds(MANY_BOUNDS.length + 1));
        for (int i = 0; i < MANY_FLAGS_ARRAY.length; i++) {
            final int expectedFlags = MANY_FLAGS_ARRAY[i];
            assertEquals(expectedFlags, info.getCharacterRectFlags(i));
            assertEquals(expectedFlags, info.getCharacterBoundsFlags(i));
        }
        assertEquals(0, info.getCharacterRectFlags(-1));
        assertEquals(0, info.getCharacterRectFlags(MANY_BOUNDS.length + 1));
        assertEquals(0, info.getCharacterBoundsFlags(-1));
        assertEquals(0, info.getCharacterBoundsFlags(MANY_BOUNDS.length + 1));

        // Make sure that the builder can reproduce the same object.
        final CursorAnchorInfo info2 = builder.build();
@@ -141,16 +141,16 @@ public class CursorAnchorInfoTest extends InstrumentationTestCase {
        assertEquals(TRANSFORM_MATRIX, info2.getMatrix());
        for (int i = 0; i < MANY_BOUNDS.length; i++) {
            final RectF expectedBounds = MANY_BOUNDS[i];
            assertEquals(expectedBounds, info2.getCharacterRect(i));
            assertEquals(expectedBounds, info2.getCharacterBounds(i));
        }
        assertNull(info2.getCharacterRect(-1));
        assertNull(info2.getCharacterRect(MANY_BOUNDS.length + 1));
        assertNull(info2.getCharacterBounds(-1));
        assertNull(info2.getCharacterBounds(MANY_BOUNDS.length + 1));
        for (int i = 0; i < MANY_FLAGS_ARRAY.length; i++) {
            final int expectedFlags = MANY_FLAGS_ARRAY[i];
            assertEquals(expectedFlags, info2.getCharacterRectFlags(i));
            assertEquals(expectedFlags, info2.getCharacterBoundsFlags(i));
        }
        assertEquals(0, info2.getCharacterRectFlags(-1));
        assertEquals(0, info2.getCharacterRectFlags(MANY_BOUNDS.length + 1));
        assertEquals(0, info2.getCharacterBoundsFlags(-1));
        assertEquals(0, info2.getCharacterBoundsFlags(MANY_BOUNDS.length + 1));
        assertEquals(info, info2);
        assertEquals(info.hashCode(), info2.hashCode());

@@ -168,16 +168,16 @@ public class CursorAnchorInfoTest extends InstrumentationTestCase {
        assertEquals(TRANSFORM_MATRIX, info3.getMatrix());
        for (int i = 0; i < MANY_BOUNDS.length; i++) {
            final RectF expectedBounds = MANY_BOUNDS[i];
            assertEquals(expectedBounds, info3.getCharacterRect(i));
            assertEquals(expectedBounds, info3.getCharacterBounds(i));
        }
        assertNull(info3.getCharacterRect(-1));
        assertNull(info3.getCharacterRect(MANY_BOUNDS.length + 1));
        assertNull(info3.getCharacterBounds(-1));
        assertNull(info3.getCharacterBounds(MANY_BOUNDS.length + 1));
        for (int i = 0; i < MANY_FLAGS_ARRAY.length; i++) {
            final int expectedFlags = MANY_FLAGS_ARRAY[i];
            assertEquals(expectedFlags, info3.getCharacterRectFlags(i));
            assertEquals(expectedFlags, info3.getCharacterBoundsFlags(i));
        }
        assertEquals(0, info3.getCharacterRectFlags(-1));
        assertEquals(0, info3.getCharacterRectFlags(MANY_BOUNDS.length + 1));
        assertEquals(0, info3.getCharacterBoundsFlags(-1));
        assertEquals(0, info3.getCharacterBoundsFlags(MANY_BOUNDS.length + 1));
        assertEquals(info.hashCode(), info3.hashCode());

        builder.reset();