Bug 968409 - Add assertNotEquals method; r=mcomella
authorJim Chen <nchen@mozilla.com>
Thu, 27 Feb 2014 16:17:54 -0500
changeset 171353 96c94ab2c0bae926048c625a5ffe5b4dd5e08d17
parent 171352 1b4c49b077908f5d7e0296d3027a269caa1c94e9
child 171354 081f28069e48d5ed0d9b318660dfe49e32ae3db0
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersmcomella
bugs968409
milestone30.0a1
Bug 968409 - Add assertNotEquals method; r=mcomella
mobile/android/base/tests/helpers/AssertionHelper.java
--- a/mobile/android/base/tests/helpers/AssertionHelper.java
+++ b/mobile/android/base/tests/helpers/AssertionHelper.java
@@ -57,16 +57,28 @@ public final class AssertionHelper {
     public static void assertEquals(final String message, final long expected, final long actual) {
         sAsserter.is(actual, expected, message);
     }
 
     public static void assertEquals(final String message, final Object expected, final Object actual) {
         sAsserter.is(actual, expected, message);
     }
 
+    public static void assertNotEquals(final String message, final double unexpected, final double actual, final double delta) {
+        sAsserter.ok(Math.abs(unexpected - actual) > delta, message, DIAG_STRING);
+    }
+
+    public static void assertNotEquals(final String message, final long unexpected, final long actual) {
+        sAsserter.isnot(actual, unexpected, message);
+    }
+
+    public static void assertNotEquals(final String message, final Object unexpected, final Object actual) {
+        sAsserter.isnot(actual, unexpected, message);
+    }
+
     public static void assertFalse(final String message, final boolean actual) {
         sAsserter.ok(!actual, message, DIAG_STRING);
     }
 
     public static void assertNotNull(final String message, final Object actual) {
         sAsserter.isnot(actual, null, message);
     }