Search in sources :

Example 76 with SmallTest

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());
}
Also used : Pattern(java.util.regex.Pattern) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 77 with SmallTest

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);
}
Also used : Rect(android.graphics.Rect) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 78 with SmallTest

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));
}
Also used : LinearLayout(android.widget.LinearLayout) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 79 with SmallTest

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));
}
Also used : LinearLayout(android.widget.LinearLayout) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 80 with SmallTest

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());
}
Also used : Pattern(java.util.regex.Pattern) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

SmallTest (android.test.suitebuilder.annotation.SmallTest)2108 Test (org.junit.Test)235 Parcel (android.os.Parcel)153 ArrayList (java.util.ArrayList)104 Time (android.text.format.Time)97 Rect (android.graphics.Rect)94 TelephonyTest (com.android.internal.telephony.TelephonyTest)84 Bundle (android.os.Bundle)77 ByteBuffer (java.nio.ByteBuffer)71 Intent (android.content.Intent)69 LinkProperties (android.net.LinkProperties)68 SpannableString (android.text.SpannableString)61 FlakyTest (android.support.test.filters.FlakyTest)58 DhcpPacket (android.net.dhcp.DhcpPacket)52 Rational (android.util.Rational)50 NetworkRequest (android.net.NetworkRequest)48 File (java.io.File)47 RouteInfo (android.net.RouteInfo)45 BitwiseOutputStream (com.android.internal.util.BitwiseOutputStream)45 ParcelUuid (android.os.ParcelUuid)43