summaryrefslogtreecommitdiff
path: root/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:04:04 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:04:04 -0800
commite943f2fd8e7623ba3ea12bb65294d30446db4174 (patch)
treeeda2f24648d61fb33f3fa754d9fb4b5693517e0c /samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java
parent5c11852110eeb03dc5a69111354b383f98d15336 (diff)
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java')
-rw-r--r--samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java b/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java
index 8c9c8a537..b52e4b842 100644
--- a/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java
+++ b/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java
@@ -20,6 +20,7 @@ import com.example.android.apis.R;
import android.content.Context;
import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
import android.view.FocusFinder;
import android.view.LayoutInflater;
import android.view.View;
@@ -87,6 +88,7 @@ public class Focus2AndroidTest extends AndroidTestCase {
* explain any and all failures in other tests. This is not guaranteed
* to run before other tests, as junit uses reflection to find the tests.
*/
+ @SmallTest
public void testPreconditions() {
assertNotNull(mLeftButton);
assertTrue("center button should be right of left button",
@@ -95,12 +97,14 @@ public class Focus2AndroidTest extends AndroidTestCase {
mCenterButton.getRight() < mRightButton.getLeft());
}
+ @SmallTest
public void testGoingRightFromLeftButtonJumpsOverCenterToRight() {
assertEquals("right should be next focus from left",
mRightButton,
mFocusFinder.findNextFocus(mRoot, mLeftButton, View.FOCUS_RIGHT));
}
+ @SmallTest
public void testGoingLeftFromRightButtonGoesToCenter() {
assertEquals("center should be next focus from right",
mCenterButton,