org.junit.Assert.assertEquals(new Interval(4, 105), sem.minus(new Interval(3,5), new Interval(-100, -1)));
}
@Test
public void testMultiply(){
IntervalExpressionSemantics sem = new IntervalExpressionSemantics();
//bottom
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(Interval.BOTTOM, Interval.BOTTOM));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(Interval.BOTTOM, new Interval(-1,2)));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(Interval.BOTTOM, new Interval(1, Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(Interval.BOTTOM, new Interval(Double.NEGATIVE_INFINITY, 1)));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(Interval.BOTTOM, new Interval(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(new Interval(-1,2), Interval.BOTTOM));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(new Interval(1, Double.POSITIVE_INFINITY), Interval.BOTTOM));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(new Interval(Double.NEGATIVE_INFINITY, 1), Interval.BOTTOM));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(TOP, Interval.BOTTOM));
org.junit.Assert.assertEquals(Interval.BOTTOM, sem.times(Interval.BOTTOM, TOP));
org.junit.Assert.assertEquals(TOP, sem.times(TOP, TOP));
org.junit.Assert.assertEquals(TOP, sem.times(TOP, new Interval(1,2)));
org.junit.Assert.assertEquals(TOP, sem.times(TOP, new Interval(1,Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(TOP, sem.times(TOP, new Interval(Double.NEGATIVE_INFINITY, 3)));
org.junit.Assert.assertEquals(TOP, sem.times(new Interval(3, Double.POSITIVE_INFINITY), new Interval(Double.NEGATIVE_INFINITY, 3)));
org.junit.Assert.assertEquals(TOP, sem.times(new Interval(-3, Double.POSITIVE_INFINITY), new Interval(Double.NEGATIVE_INFINITY, -3)));
org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -9), sem.times(new Interval(3, Double.POSITIVE_INFINITY), new Interval(Double.NEGATIVE_INFINITY, -3)));
org.junit.Assert.assertEquals(new Interval(0,0), sem.times(TOP, new Interval(0,0)));
org.junit.Assert.assertEquals(new Interval(0,0), sem.times(new Interval(0,0), TOP));
org.junit.Assert.assertEquals(TOP, sem.times(TOP, new Interval(0,1)));
org.junit.Assert.assertEquals(TOP, sem.times(TOP, new Interval(-1,0)));
org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.times(new Interval(0, Double.POSITIVE_INFINITY), new Interval(0,1)));
org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.times(new Interval(0,1), new Interval(0, Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(new Interval(-5, Double.POSITIVE_INFINITY), sem.times(new Interval(0,1), new Interval(-5, Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(new Interval(-35, Double.POSITIVE_INFINITY), sem.times(new Interval(0,7), new Interval(-5, Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(TOP, sem.times(new Interval(-1,7), new Interval(-5, Double.POSITIVE_INFINITY)));
org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, 0), sem.times(new Interval(Double.NEGATIVE_INFINITY, 0), new Interval(0,1)));
org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, 0), sem.times(new Interval(0,1), new Interval(Double.NEGATIVE_INFINITY, 0)));
org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, 5), sem.times(new Interval(0,1), new Interval(Double.NEGATIVE_INFINITY, 5)));
org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, 35), sem.times(new Interval(0,7), new Interval(Double.NEGATIVE_INFINITY, 5)));
org.junit.Assert.assertEquals(TOP, sem.times(new Interval(-1,7), new Interval(Double.NEGATIVE_INFINITY, 5)));
org.junit.Assert.assertEquals(new Interval(-500, -3), sem.times(new Interval(-100, -1), new Interval(3,5)));
org.junit.Assert.assertEquals(new Interval(-500, -3), sem.times(new Interval(3,5), new Interval(-100, -1)));
org.junit.Assert.assertEquals(new Interval(-500, 5), sem.times(new Interval(3,5), new Interval(-100, 1)));
org.junit.Assert.assertEquals(new Interval(-500, 5), sem.times(new Interval(-100, 1), new Interval(3,5)));
}