aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-09-04 13:34:53 -0700
committerXin Li <delphij@google.com>2019-09-04 13:34:53 -0700
commit66fb808791b86e7e0903a834fdfa187132ea0bdf (patch)
tree06816df073e9c2aedd67f8806efed9e31d25517f /tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
parentc8db60faa55ef3ee9780b13ce361f5c08756a5f1 (diff)
parent7748102af148a0b0321bb03446a5b207952eed01 (diff)
downloadlatinime-66fb808791b86e7e0903a834fdfa187132ea0bdf.tar.gz
latinime-66fb808791b86e7e0903a834fdfa187132ea0bdf.tar.xz
latinime-66fb808791b86e7e0903a834fdfa187132ea0bdf.zip
DO NOT MERGE - Merge Android 10 into master
Bug: 139893257 Change-Id: I67cbe34b4646ddfdb0868bf8eaca12100a4e7b16
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java b/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
index ad6bcc3c4..986c8e3dd 100644
--- a/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
+++ b/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
@@ -16,18 +16,26 @@
package com.android.inputmethod.latin.touchinputconsumer;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for GestureConsumer.NULL_GESTURE_CONSUMER.
*/
@SmallTest
-public class NullGestureConsumerTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class NullGestureConsumerTests {
/**
* Tests that GestureConsumer.NULL_GESTURE_CONSUMER indicates that it won't consume gesture data
* and that its methods don't raise exceptions even for invalid data.
*/
+ @Test
public void testNullGestureConsumer() {
assertFalse(GestureConsumer.NULL_GESTURE_CONSUMER.willConsume());
GestureConsumer.NULL_GESTURE_CONSUMER.onInit(null, null);
@@ -40,6 +48,7 @@ public class NullGestureConsumerTests extends AndroidTestCase {
/**
* Tests that newInstance returns NULL_GESTURE_CONSUMER for invalid input.
*/
+ @Test
public void testNewInstanceGivesNullGestureConsumerForInvalidInputs() {
assertSame(GestureConsumer.NULL_GESTURE_CONSUMER,
GestureConsumer.newInstance(null, null, null, null));