Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fd8e16e authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Remove last user of lookupTimeZoneIdsByCountry()" am: 2e6bc9c5 am:...

Merge "Remove last user of lookupTimeZoneIdsByCountry()" am: 2e6bc9c5 am: 7506e0d2 am: 94e9baa1
am: 638087c5

Change-Id: I5ca4fdf38d0b9616a1bff2cbb1aec423d04ad9b7
parents 6bc9cd31 638087c5
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -27,14 +27,11 @@ import static org.junit.Assert.assertTrue;
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;

import libcore.timezone.TimeZoneFinder;

import org.junit.Before;
import org.junit.Test;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;

public class TimeZoneLookupHelperTest {
@@ -231,7 +228,6 @@ public class TimeZoneLookupHelperTest {
            assertEquals(expectedResult, adSummerWithDstResult);
            assertOffsetResultZoneOffsets(nhSummerTimeMillis, expectedUtcOffset, expectedDstOffset,
                    adSummerWithDstResult);
            assertOffsetResultZoneCountry(adIso, adSummerWithDstResult);
        }

        // Summer, known & incorrect DST state (DST == false)
@@ -389,15 +385,6 @@ public class TimeZoneLookupHelperTest {
        assertTrue(mTimeZoneLookupHelper.countryUsesUtc("gb", NH_WINTER_TIME_MILLIS));
    }

    private static void assertOffsetResultZoneCountry(
            String isoCountryCode, OffsetResult lookupResult) {
        String timeZoneId = lookupResult.getTimeZone().getID();
        List<String> zoneIdsByCountry =
                TimeZoneFinder.getInstance().lookupTimeZoneIdsByCountry(isoCountryCode);
        assertTrue(timeZoneId + " must be used in " + isoCountryCode,
                zoneIdsByCountry.contains(timeZoneId));
    }

    /**
     * Assert the time zone in the OffsetResult has the expected properties at the specified time.
     */
@@ -436,5 +423,4 @@ public class TimeZoneLookupHelperTest {
    private static TimeZone zone(String zoneId) {
        return TimeZone.getFrozenTimeZone(zoneId);
    }

}