Merge "Add test for getDeprecationTime and getExpirationTime"

This commit is contained in:
Chiachang Wang 2020-03-10 03:40:55 +00:00 • committed by Gerrit Code Review
commit c5d2170b64

View file

@ -367,6 +367,9 @@ public class LinkAddressTest {
-2, 100000L);
fail("negative deprecation time should cause exception");
} catch (IllegalArgumentException expected) { }
LinkAddress addr = new LinkAddress(V6_ADDRESS, 64, 0, 456, 100000L, 200000L);
assertEquals(100000L, addr.getDeprecationTime());
}
@Test @IgnoreUpTo(Build.VERSION_CODES.Q)
@ -382,6 +385,9 @@ public class LinkAddressTest {
100000L, -2);
fail("negative expiration time should cause exception");
} catch (IllegalArgumentException expected) { }
LinkAddress addr = new LinkAddress(V6_ADDRESS, 64, 0, 456, 100000L, 200000L);
assertEquals(200000L, addr.getExpirationTime());
}
@Test