use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class ScanFilterTest method testsetServiceDataFilter.
@SmallTest
public void testsetServiceDataFilter() {
byte[] setServiceData = new byte[] { 0x50, 0x64 };
ParcelUuid serviceDataUuid = ParcelUuid.fromString("0000110B-0000-1000-8000-00805F9B34FB");
ScanFilter filter = mFilterBuilder.setServiceData(serviceDataUuid, setServiceData).build();
assertTrue("service data filter fails", filter.matches(mScanResult));
byte[] emptyData = new byte[0];
filter = mFilterBuilder.setServiceData(serviceDataUuid, emptyData).build();
assertTrue("service data filter fails", filter.matches(mScanResult));
byte[] prefixData = new byte[] { 0x50 };
filter = mFilterBuilder.setServiceData(serviceDataUuid, prefixData).build();
assertTrue("service data filter fails", filter.matches(mScanResult));
byte[] nonMatchData = new byte[] { 0x51, 0x64 };
byte[] mask = new byte[] { (byte) 0x00, (byte) 0xFF };
filter = mFilterBuilder.setServiceData(serviceDataUuid, nonMatchData, mask).build();
assertTrue("partial service data filter fails", filter.matches(mScanResult));
filter = mFilterBuilder.setServiceData(serviceDataUuid, nonMatchData).build();
assertFalse("service data filter fails", filter.matches(mScanResult));
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class ScanFilterTest method testDeviceFilter.
@SmallTest
public void testDeviceFilter() {
ScanFilter filter = mFilterBuilder.setDeviceAddress(DEVICE_MAC).build();
assertTrue("device filter fails", filter.matches(mScanResult));
filter = mFilterBuilder.setDeviceAddress("11:22:33:44:55:66").build();
assertFalse("device filter fails", filter.matches(mScanResult));
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class TimeTest method testParse0.
@SmallTest
public void testParse0() throws Exception {
Time t = new Time(Time.TIMEZONE_UTC);
t.parse("12345678T901234");
// System.out.println("t=" + t);
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class TimeTest method testGetActualMaximum0.
@SmallTest
public void testGetActualMaximum0() throws Exception {
Time t = new Time(Time.TIMEZONE_UTC);
int r = t.getActualMaximum(Time.SECOND);
// System.out.println("r=" + r);
}
use of android.test.suitebuilder.annotation.SmallTest in project android_frameworks_base by ResurrectionRemix.
the class TimeTest method testMillis1.
@SmallTest
public void testMillis1() throws Exception {
Time t = new Time(Time.TIMEZONE_UTC);
t.set(1, 0, 0, 1, 0, 1970);
long r = t.toMillis(true);
// System.out.println("r=" + r);
}
Aggregations