Esempio n. 1
0
 public void testEqualsToDouble() {
   alice.tuprolog.Double zero = new alice.tuprolog.Double(0);
   alice.tuprolog.Double one = new alice.tuprolog.Double(1);
   assertFalse(zero.equals(one));
   alice.tuprolog.Double anotherZero = new alice.tuprolog.Double(0.0);
   assertTrue(anotherZero.equals(zero));
 }
 @Test
 public void equalsToInt() {
   alice.tuprolog.Double doubleOne = new alice.tuprolog.Double(1.0);
   Int integerOne = new Int(1);
   assertFalse(doubleOne.equals(integerOne));
 }
 @Test
 public void equalsToVar() throws InvalidTermException {
   alice.tuprolog.Double one = new alice.tuprolog.Double(1);
   Var x = new Var("X");
   assertFalse(one.equals(x));
 }
 @Test
 public void equalsToStruct() {
   alice.tuprolog.Double zero = new alice.tuprolog.Double(0);
   Struct s = new Struct();
   assertFalse(zero.equals(s));
 }