Factorize custom asserts.

Also a few utilities that were in the way, and some opportunistic
cleanups.

Test: FrameworksNetTest NetworkStackTest
Change-Id: I385070e2044fd967cb18f1ffea9a86a4627b742e
This commit is contained in:
Chalard Jean
2019-05-30 17:11:14 +09:00
parent 18e3198519
commit 6480287469
24 changed files with 181 additions and 395 deletions

View File

@@ -16,14 +16,14 @@
package android.net;
import static com.android.testutils.ParcelUtilsKt.assertParcelingIsLossless;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import android.net.SocketKeepalive.InvalidPacketException;
import com.android.internal.util.TestUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -79,7 +79,7 @@ public final class TcpKeepalivePacketDataTest {
assertEquals(testInfo.tos, resultData.ipTos);
assertEquals(testInfo.ttl, resultData.ipTtl);
TestUtils.assertParcelingIsLossless(resultData);
assertParcelingIsLossless(resultData);
final byte[] packet = resultData.getPacket();
// IP version and IHL