use of android.test.suitebuilder.annotation.Suppress in project android_frameworks_base by AOSPA.
the class TimeTest method disableTestGetJulianDay.
@Suppress
public void disableTestGetJulianDay() throws Exception {
Time time = new Time();
// same Julian day.
for (int monthDay = 1; monthDay <= 366; monthDay++) {
for (int zoneIndex = 0; zoneIndex < mTimeZones.length; zoneIndex++) {
// We leave the "month" as zero because we are changing the
// "monthDay" from 1 to 366. The call to normalize() will
// then change the "month" (but we don't really care).
time.set(0, 0, 0, monthDay, 0, 2008);
time.timezone = mTimeZones[zoneIndex];
long millis = time.normalize(true);
if (zoneIndex == 0) {
Log.i("TimeTest", time.format("%B %d, %Y"));
}
// This is the Julian day for 12am for this day of the year
int julianDay = Time.getJulianDay(millis, time.gmtoff);
// Julian day.
for (int hour = 0; hour < 24; hour++) {
for (int minute = 0; minute < 60; minute += 15) {
time.set(0, minute, hour, monthDay, 0, 2008);
millis = time.normalize(true);
int day = Time.getJulianDay(millis, time.gmtoff);
if (day != julianDay) {
Log.e("TimeTest", "Julian day: " + day + " at time " + time.hour + ":" + time.minute + " != today's Julian day: " + julianDay + " timezone: " + time.timezone);
}
assertEquals(day, julianDay);
}
}
}
}
}
use of android.test.suitebuilder.annotation.Suppress in project android_frameworks_base by AOSPA.
the class TimeTest method disableTestSetJulianDay.
@Suppress
public void disableTestSetJulianDay() throws Exception {
Time time = new Time();
// test that we can set the Julian day correctly.
for (int monthDay = 1; monthDay <= 366; monthDay++) {
for (int zoneIndex = 0; zoneIndex < mTimeZones.length; zoneIndex++) {
// We leave the "month" as zero because we are changing the
// "monthDay" from 1 to 366. The call to normalize() will
// then change the "month" (but we don't really care).
time.set(0, 0, 0, monthDay, 0, 2008);
time.timezone = mTimeZones[zoneIndex];
long millis = time.normalize(true);
if (zoneIndex == 0) {
Log.i("TimeTest", time.format("%B %d, %Y"));
}
int julianDay = Time.getJulianDay(millis, time.gmtoff);
time.setJulianDay(julianDay);
// Some places change daylight saving time at 12am and so there
// is no 12am on some days in some timezones. In those cases,
// the time is set to 1am.
// Examples: Africa/Cairo on April 25, 2008
// America/Sao_Paulo on October 12, 2008
// Atlantic/Azores on March 30, 2008
assertTrue(time.hour == 0 || time.hour == 1);
assertEquals(0, time.minute);
assertEquals(0, time.second);
millis = time.toMillis(false);
int day = Time.getJulianDay(millis, time.gmtoff);
if (day != julianDay) {
Log.i("TimeTest", "Error: gmtoff " + (time.gmtoff / 3600.0) + " day " + julianDay + " millis " + millis + " " + time.format("%B %d, %Y") + " " + time.timezone);
}
assertEquals(day, julianDay);
}
}
}
use of android.test.suitebuilder.annotation.Suppress in project android_frameworks_base by AOSPA.
the class AppCacheTest method testFreeApplicationCacheAllFiles.
@LargeTest
// Failing.
@Suppress
public void testFreeApplicationCacheAllFiles() throws Exception {
boolean TRACKING = true;
StatFs st = new StatFs("/data");
long blks1 = getFreeStorageBlks(st);
long availableMem = getFreeStorageSize(st);
File cacheDir = mContext.getCacheDir();
assertNotNull(cacheDir);
createTestFiles1(cacheDir, "testtmpdir", 5);
long blks2 = getFreeStorageBlks(st);
if (localLOGV || TRACKING)
Log.i(TAG, "blk1=" + blks1 + ", blks2=" + blks2);
//this should free up the test files that were created earlier
if (!invokePMFreeApplicationCache(availableMem)) {
fail("Could not successfully invoke PackageManager free app cache API");
}
long blks3 = getFreeStorageBlks(st);
if (localLOGV || TRACKING)
Log.i(TAG, "blks3=" + blks3);
verifyTestFiles1(cacheDir, "testtmpdir", 5);
}
use of android.test.suitebuilder.annotation.Suppress in project android_frameworks_base by AOSPA.
the class MediaPlayerInvokeTest method testPing.
// Generate a random number, sends it to the ping test player.
@Suppress
@MediumTest
public void testPing() throws Exception {
mPlayer.setDataSource("test:invoke_mock_media_player.so?url=ping");
Parcel request = mPlayer.newRequest();
Parcel reply = Parcel.obtain();
int val = rnd.nextInt();
request.writeInt(val);
mPlayer.invoke(request, reply);
assertEquals(val, reply.readInt());
}
use of android.test.suitebuilder.annotation.Suppress in project android_frameworks_base by DirtyUnicorns.
the class TimeTest method disableTestSetJulianDay.
@Suppress
public void disableTestSetJulianDay() throws Exception {
Time time = new Time();
// test that we can set the Julian day correctly.
for (int monthDay = 1; monthDay <= 366; monthDay++) {
for (int zoneIndex = 0; zoneIndex < mTimeZones.length; zoneIndex++) {
// We leave the "month" as zero because we are changing the
// "monthDay" from 1 to 366. The call to normalize() will
// then change the "month" (but we don't really care).
time.set(0, 0, 0, monthDay, 0, 2008);
time.timezone = mTimeZones[zoneIndex];
long millis = time.normalize(true);
if (zoneIndex == 0) {
Log.i("TimeTest", time.format("%B %d, %Y"));
}
int julianDay = Time.getJulianDay(millis, time.gmtoff);
time.setJulianDay(julianDay);
// Some places change daylight saving time at 12am and so there
// is no 12am on some days in some timezones. In those cases,
// the time is set to 1am.
// Examples: Africa/Cairo on April 25, 2008
// America/Sao_Paulo on October 12, 2008
// Atlantic/Azores on March 30, 2008
assertTrue(time.hour == 0 || time.hour == 1);
assertEquals(0, time.minute);
assertEquals(0, time.second);
millis = time.toMillis(false);
int day = Time.getJulianDay(millis, time.gmtoff);
if (day != julianDay) {
Log.i("TimeTest", "Error: gmtoff " + (time.gmtoff / 3600.0) + " day " + julianDay + " millis " + millis + " " + time.format("%B %d, %Y") + " " + time.timezone);
}
assertEquals(day, julianDay);
}
}
}
Aggregations