Fix a couple of unit tests.
Change-Id: I4ade90fbfdb10cd5cd4980638946871e473e4d20
diff --git a/common/src/com/android/inputmethod/latin/common/CollectionUtils.java b/common/src/com/android/inputmethod/latin/common/CollectionUtils.java
index f7ba693..48df413 100644
--- a/common/src/com/android/inputmethod/latin/common/CollectionUtils.java
+++ b/common/src/com/android/inputmethod/latin/common/CollectionUtils.java
@@ -16,6 +16,8 @@
package com.android.inputmethod.latin.common;
+import com.android.inputmethod.annotations.UsedForTesting;
+
import java.util.ArrayList;
import java.util.Collection;
@@ -57,6 +59,7 @@
* @param c Collection to test.
* @return Whether c contains no elements.
*/
+ @UsedForTesting
public static boolean isNullOrEmpty(@Nullable final Collection<?> c) {
return c == null || c.isEmpty();
}
diff --git a/common/src/com/android/inputmethod/latin/common/InputPointers.java b/common/src/com/android/inputmethod/latin/common/InputPointers.java
index 7beee15..4b2ae7e 100644
--- a/common/src/com/android/inputmethod/latin/common/InputPointers.java
+++ b/common/src/com/android/inputmethod/latin/common/InputPointers.java
@@ -112,6 +112,7 @@
* Shift to the left by elementCount, discarding elementCount pointers at the start.
* @param elementCount how many elements to shift.
*/
+ @UsedForTesting
public void shift(final int elementCount) {
mXCoordinates.shift(elementCount);
mYCoordinates.shift(elementCount);
diff --git a/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java b/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java
index 340abb2..77f5c4c 100644
--- a/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java
+++ b/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java
@@ -16,6 +16,8 @@
package com.android.inputmethod.latin.common;
+import com.android.inputmethod.annotations.UsedForTesting;
+
import java.util.Arrays;
import javax.annotation.Nonnull;
@@ -140,6 +142,7 @@
* Shift to the left by elementCount, discarding elementCount pointers at the start.
* @param elementCount how many elements to shift.
*/
+ @UsedForTesting
public void shift(final int elementCount) {
System.arraycopy(mArray, elementCount, mArray, 0, mLength - elementCount);
mLength -= elementCount;