use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class PatternsTest method testIanaTopLevelDomains_matchesPunycodeTld.
@SmallTest
public void testIanaTopLevelDomains_matchesPunycodeTld() throws Exception {
Pattern pattern = Pattern.compile(Patterns.IANA_TOP_LEVEL_DOMAINS);
assertTrue("Should match Punycode TLD", pattern.matcher("xn--qxam").matches());
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class FocusFinderTest method testAboveInBeamTrumpsSlightlyCloserOutOfBeam.
@SmallTest
public void testAboveInBeamTrumpsSlightlyCloserOutOfBeam() {
// src (left, top, right, bottom)
Rect src = new Rect(0, 50, 20, 70);
Rect directlyAbove = new Rect(src);
directlyAbove.offset(0, -(1 + src.height()));
Rect aboveLeft = new Rect(src);
aboveLeft.offset(-(1 + src.width()), -(1 + src.height()));
// offset directly above a little further up
directlyAbove.offset(0, -5);
assertBetterCandidate(View.FOCUS_UP, src, directlyAbove, aboveLeft);
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class CreateViewTest method testLayout3.
@SmallTest
public void testLayout3() throws Exception {
LinearLayout vert = new LinearLayout(mContext);
ViewOne one = new ViewOne(mContext);
vert.addView(one, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne two = new ViewOne(mContext);
vert.addView(two, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne three = new ViewOne(mContext);
vert.addView(three, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne four = new ViewOne(mContext);
vert.addView(four, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne five = new ViewOne(mContext);
vert.addView(five, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne six = new ViewOne(mContext);
vert.addView(six, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class CreateViewTest method testLayout2.
@SmallTest
public void testLayout2() throws Exception {
LinearLayout vert = new LinearLayout(mContext);
vert.addView(new CreateViewTest.ViewOne(mContext), new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class PatternsTest method testIanaTopLevelDomains_matchesValidTld.
// Tests for Patterns.IANA_TOP_LEVEL_DOMAINS
@SmallTest
public void testIanaTopLevelDomains_matchesValidTld() throws Exception {
Pattern pattern = Pattern.compile(Patterns.IANA_TOP_LEVEL_DOMAINS);
assertTrue("Should match 'com'", pattern.matcher("com").matches());
}
Aggregations