We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf8aeb1 commit 46e721bCopy full SHA for 46e721b
src/main/java/de/tilman_neumann/util/Ensure.java
@@ -48,7 +48,7 @@ public static void ensureSmallerEquals(long left, long right) {
48
}
49
50
public static void ensureEquals(long left, long right) {
51
- if (! (left == right)) {
+ if (left != right) {
52
throw new AssertionError("Assertion failed: " + left + " == " + right);
53
54
@@ -65,6 +65,12 @@ public static void ensureGreater(long left, long right) {
65
66
67
68
+ public static void ensureNotEquals(long left, long right) {
69
+ if (left == right) {
70
+ throw new AssertionError("Assertion failed: " + left + " != " + right);
71
+ }
72
73
+
74
// BigInteger comparison
75
76
public static void ensureSmaller(BigInteger left, BigInteger right) {
0 commit comments