Java Assert Equal assertEquals(double x, double y)

Here you can find the source of assertEquals(double x, double y)

Description

assert Equals

License

Open Source License

Declaration

public static void assertEquals(double x, double y) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void assertEquals(double x, double y) {
        assertEquals(x, y, 1e-10);//from  ww  w.java 2 s .c om
    }

    public static void assertEquals(double x, double y, double tol) {
        assert Math.abs(x - y) < tol : x + " != " + y;
    }
}

Related

  1. assertCharacterArraysEqual(char[] first, char[] second)
  2. assertDatesEqual(Calendar first, Calendar second)
  3. assertEqual(final double d1, final double d2, final double precisionRange)
  4. assertEqual(Object obj1, Object obj2)
  5. assertEquality(Object original, Object equal, Object... notEqual)
  6. assertEquals(double x, double y)
  7. assertEquals(final int expected, final int actual)
  8. assertEquals(final Object actual, final Object expected, final String name)
  9. assertEquals(float a1, float a2)