diff --git a/mihxil-theories/src/main/java/org/meeuw/theories/ComparableTheory.java b/mihxil-theories/src/main/java/org/meeuw/theories/ComparableTheory.java index 4f6e1c17..69596c0a 100644 --- a/mihxil-theories/src/main/java/org/meeuw/theories/ComparableTheory.java +++ b/mihxil-theories/src/main/java/org/meeuw/theories/ComparableTheory.java @@ -32,11 +32,11 @@ public interface ComparableTheory> extends BasicObjectTh * TODO: This is not an absolute requirement, in some cases you may want to compareTo to zero even if two objects are not exactly equal. */ @Property(maxDiscardRatio = 10000) - default void equalsConsistentWithComparable(@ForAll(EQUAL_DATAPOINTS) Tuple2 pair) { + default void equalsConsistentWithComparable(@ForAll(EQUAL_DATAPOINTS) Tuple2 pair) { try { assertThat(pair.get1().compareTo(pair.get2())).isEqualTo(0); } catch (ClassCastException | NotComparableException exception) { - Assume.that(false); + throw new TestAbortedException(); } }