Fix ViewAnimatorTest's testConstructor Test
Remove a line in the test that expected the constructor to work with a null
Context. Also remove the subsequent line that tried to test two null
arguments, since throwing a NPE is not a behavior that needs to be expected
and enforced. Leave the remaining tests, since they do test that nothing
blows up when given all non-null arguments.
Change-Id: I0ae638310970fca061c9e6145f5a2b2e05d464e3
diff --git a/tests/tests/widget/src/android/widget/cts/ViewAnimatorTest.java b/tests/tests/widget/src/android/widget/cts/ViewAnimatorTest.java
index 8d7bd43..accbe6d 100644
--- a/tests/tests/widget/src/android/widget/cts/ViewAnimatorTest.java
+++ b/tests/tests/widget/src/android/widget/cts/ViewAnimatorTest.java
@@ -22,7 +22,6 @@
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargetNew;
import dalvik.annotation.TestTargets;
-import dalvik.annotation.ToBeFixed;
import org.xmlpull.v1.XmlPullParser;
@@ -80,18 +79,9 @@
args = {android.content.Context.class, android.util.AttributeSet.class}
)
})
- @ToBeFixed(bug = "1417734", explanation = "Unexpected NullPointerException")
public void testConstructor() {
new ViewAnimator(mActivity);
new ViewAnimator(mActivity, mAttributeSet);
- new ViewAnimator(null);
-
- try {
- new ViewAnimator(null, null);
- fail("There should be a NullPointerException thrown out.");
- } catch (NullPointerException e) {
- // expected, test success.
- }
}
@TestTargets({