@@ -0,0 +1,1930 @@
+/**%0A * Copyright (C) 2015 The Authors.%0A */%0Apackage dk.itu.kelvin.math;%0A%0A// JUnit annotations%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A// General utilities%0A// JUnit annotations%0A// JUnit assertions%0A%0A/**%0A * %7B@link Epsilon%7D test suite.%0A *%0A * %3Cp%3E%0A * Test different epsilon methods which are used in the program.%0A *%0A * %3Cp%3E%0A *%0A */%0Apublic class EpsilonTest %7B%0A%0A  /**%0A   * Test if two values are equal.%0A   */%0A  @Test%0A  public void testEqual() %7B%0A    assertTrue(Epsilon.equal(3, 3));%0A    assertTrue(Epsilon.equal(0.05, 0.05));%0A%0A    assertFalse(Epsilon.equal(11010, 11010.01));%0A    assertFalse(Epsilon.equal(11010.02, 11010.01));%0A  %7D%0A%0A  /**%0A   * Test if a value is greater than another .%0A   */%0A  @Test%0A  public void testGreater() %7B%0A    assertTrue(Epsilon.greater(3.01, 3));%0A    assertTrue(Epsilon.greater(11102.99, 11102.9));%0A%0A    assertFalse(Epsilon.greater(11102.91, 11102.93));%0A  %7D%0A%0A  /**%0A   * Test if a value is less than another.%0A   */%0A  @Test%0A  public void testLess() %7B%0A    assertTrue(Epsilon.less(32766.8, 32766.81));%0A    assertTrue(Epsilon.less(-32766.81, -32766.80));%0A    assertTrue(Epsilon.less(-0.01, 0));%0A%0A    assertFalse(Epsilon.less(0.02, -0.01));%0A    assertFalse(Epsilon.less(134, 125));%0A  %7D%0A%0A%0A%0A  /**%0A   * Test if a value is less than or equal to another .%0A   */%0A  @Test%0A  public void testLessOrEqual() %7B%0A    assertTrue(Epsilon.lessOrEqual(5.21, 5.21));%0A    assertTrue(Epsilon.lessOrEqual(4.39, 4.42));%0A%0A    assertFalse(Epsilon.lessOrEqual(0.02, -0.01));%0A    assertFalse(Epsilon.lessOrEqual(134.9, 134.7));%0A  %7D%0A%0A  /**%0A   * Test if a value is greater than or equal to another.%0A   */%0A  @Test%0A  public void testGreaterOrEqual() %7B%0A    assertTrue(Epsilon.greaterOrEqual(5.21, 5.21));%0A    assertTrue(Epsilon.greaterOrEqual(4.42, 4.39));%0A%0A    assertFalse(Epsilon.greaterOrEqual(-0.011, -0.01));%0A    assertFalse(Epsilon.greaterOrEqual(125.20, 125.21));%0A  %7D%0A%0A%0A%0A%0A%0A%0A%7D%0A

test af math class epsilon