aboutsummaryrefslogtreecommitdiff
path: root/mockwebserver
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2016-06-24 19:24:17 +0100
committerTobias Thierer <tobiast@google.com>2016-06-29 16:50:56 +0100
commitcf362b8db836b1752eb90f7c64fb1d71c4744144 (patch)
tree75fd8b3cd8f097f99ec19cf8fceac965625b6bf6 /mockwebserver
parent5be1851c4497374aba03a8ed2e09f78b14d44254 (diff)
downloadokhttp-cf362b8db836b1752eb90f7c64fb1d71c4744144.tar.gz
Android modifications to existing files from OkHttp / okio
This CL contains all changes to existing files that were previously introduced by AOSP commit 36132b3cd2c814e057c775adc821ae0fb12aeb4c In addition, this CL adds assertNotEquals() to RealWebSocketTest.java to make it run on AOSP's version of JUnit. This commit reverts all of the changes to okio from the previous CL *except* for slight tweaks to README.android. Change-Id: Ia6c8c3ae33573f8bb3bfd638376f1421286472b2
Diffstat (limited to 'mockwebserver')
-rw-r--r--mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/MockWebServerTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/MockWebServerTest.java b/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/MockWebServerTest.java
index 95e0fe4..3792667 100644
--- a/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/MockWebServerTest.java
+++ b/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/MockWebServerTest.java
@@ -41,7 +41,6 @@ import org.junit.runners.model.Statement;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -358,4 +357,10 @@ public final class MockWebServerTest {
} catch (ConnectException expected) {
}
}
+
+ // ANDROID-BEGIN Android uses JUnit 4.10 which does not have assertNotEquals()
+ private static void assertNotEquals(Object o1, Object o2) {
+ org.junit.Assert.assertFalse(o1 == o2 || (o1 != null && o1.equals(o2)));
+ }
+ // ANDROID-END
}