You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/04/09 11:34:49 UTC

[commons-numbers] 07/07: FractionTest: zero divide should be equal to Fraction.ZERO

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit c876c0c189061564905594111e336f7e588666a0
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Apr 9 12:34:37 2020 +0100

    FractionTest: zero divide should be equal to Fraction.ZERO
    
    This relaxes the requirement that it is the same object as
    Fraction.ZERO.
---
 .../src/test/java/org/apache/commons/numbers/fraction/FractionTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/FractionTest.java b/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/FractionTest.java
index 931b4c5..5644c72 100644
--- a/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/FractionTest.java
+++ b/commons-numbers-fraction/src/test/java/org/apache/commons/numbers/fraction/FractionTest.java
@@ -314,7 +314,7 @@ public class FractionTest {
         Fraction f3 = Fraction.of(0, 5);
         Fraction f4 = Fraction.of(2, 7);
         Fraction f = f3.divide(f4);
-        Assertions.assertSame(Fraction.ZERO, f);
+        Assertions.assertEquals(Fraction.ZERO, f);
 
         final Fraction f5 = Fraction.of(Integer.MIN_VALUE, 1);
         Assertions.assertThrows(NullPointerException.class,