Beispiel #1
0
 public void testEqualsNaN() {
   Complex realNaN = new Complex(Double.NaN, 0.0);
   Complex imaginaryNaN = new Complex(0.0, Double.NaN);
   Complex complexNaN = Complex.NaN;
   assertTrue(realNaN.equals(imaginaryNaN));
   assertTrue(imaginaryNaN.equals(complexNaN));
   assertTrue(realNaN.equals(complexNaN));
 }
 public boolean reallyAnimated() {
   return !animationStart.equals(animationEnd);
 }
Beispiel #3
0
 public void testEqualsImaginaryDifference() {
   Complex x = new Complex(0.0, 0.0);
   Complex y = new Complex(0.0, 0.0 + Double.MIN_VALUE);
   assertFalse(x.equals(y));
 }
Beispiel #4
0
 public void testEqualsTrue() {
   Complex x = new Complex(3.0, 4.0);
   Complex y = new Complex(3.0, 4.0);
   assertTrue(x.equals(y));
 }
Beispiel #5
0
 public void testEqualsSame() {
   Complex x = new Complex(3.0, 4.0);
   assertTrue(x.equals(x));
 }
Beispiel #6
0
 public void testEqualsClass() {
   Complex x = new Complex(3.0, 4.0);
   assertFalse(x.equals(this));
 }
Beispiel #7
0
 public void testEqualsNull() {
   Complex x = new Complex(3.0, 4.0);
   assertFalse(x.equals(null));
 }