Revert "Revert "Unhide RouteInfo#getType and related fields""
This reverts commit 6d1ea2bb16.
Reason for revert: Re-landing changes not related to postsubmit failure
Change-Id: If7940801518be5ddec91270b3663ddfc8b42eadb
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package android.net;
|
||||
|
||||
import static android.net.RouteInfo.RTN_THROW;
|
||||
import static android.net.RouteInfo.RTN_UNICAST;
|
||||
import static android.net.RouteInfo.RTN_UNREACHABLE;
|
||||
|
||||
import static com.android.testutils.MiscAsserts.assertEqualBothWays;
|
||||
@@ -328,6 +330,16 @@ public class RouteInfoTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRouteTypes() {
|
||||
RouteInfo r = new RouteInfo(new IpPrefix(Inet6Address.ANY, 0), RTN_UNREACHABLE);
|
||||
assertEquals(RTN_UNREACHABLE, r.getType());
|
||||
r = new RouteInfo(new IpPrefix(Inet6Address.ANY, 0), RTN_UNICAST);
|
||||
assertEquals(RTN_UNICAST, r.getType());
|
||||
r = new RouteInfo(new IpPrefix(Inet6Address.ANY, 0), RTN_THROW);
|
||||
assertEquals(RTN_THROW, r.getType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTruncation() {
|
||||
LinkAddress l;
|
||||
|
||||
Reference in New Issue
Block a user