diff options
author | 2018-07-06 10:10:54 -0700 | |
---|---|---|
committer | 2018-07-06 10:10:54 -0700 | |
commit | d3b93cc95061ada6a162d7989e313f818e6d4e15 (patch) | |
tree | a4e3eaee6b84d20817d82b2a263e0e47bcc98753 /tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java | |
parent | a497886dda70bbd401652560d11d8f4010985e96 (diff) | |
download | latinime-d3b93cc95061ada6a162d7989e313f818e6d4e15.tar.gz latinime-d3b93cc95061ada6a162d7989e313f818e6d4e15.tar.xz latinime-d3b93cc95061ada6a162d7989e313f818e6d4e15.zip |
Migrate to Android Testing Support Lib (part 5/N)
This CL converts 19 test classes under com.android.inputmethod.latin
to Android Testing Support Library.
Bug: 110805255
Test: verified as follows. No new test failures.
tapas adb LatinIME LatinIMETests arm64 userdebug && \
DISABLE_PROGUARD=true make -j LatinIME && \
adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
atest LatinIMETests:com.android.inputmethod.latin
Change-Id: I878fcae0126f57c43a644af341e5a0a8ac8f5cc9
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java | 15 |
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..d508f3667 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 android.support.test.filters.SmallTest; +import android.support.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)); |