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 2019/12/05 00:45:54 UTC

[commons-numbers] 03/04: Reorder assertion error arguments

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 fb4b645d6e8073764ce00adf5a78b083ff7a1f7b
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Thu Dec 5 00:43:52 2019 +0000

    Reorder assertion error arguments
---
 .../test/java/org/apache/commons/numbers/complex/CStandardTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java
index 7285399..4bbb80b 100644
--- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java
+++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/CStandardTest.java
@@ -181,7 +181,7 @@ public class CStandardTest {
         if (!equals(c1.getReal(), c2.getReal()) ||
             !equals(c1.getImaginary(), c2.getImaginary())) {
             Assertions.fail(String.format("Conjugate equality failed (z=%s). Expected: %s but was: %s",
-                                          z, c2, c1));
+                                          z, c1, c2));
         }
     }
 
@@ -247,8 +247,8 @@ public class CStandardTest {
         // Test for binary equality
         if (!equals(c1.getReal(), c2.getReal()) ||
             !equals(c1.getImaginary(), c2.getImaginary())) {
-            Assertions.fail(String.format("%s equality failed (z=%s). Expected: %s but was: %s",
-                                          odd ? "Odd" : "Even", z, c2, c1));
+            Assertions.fail(String.format("%s equality failed (z=%s, -z=%s). Expected: %s but was: %s",
+                                          odd ? "Odd" : "Even", z, z.negate(), c1, c2));
         }
     }