Skip to content

Commit

Permalink
NUMBERS-38 (unit test).
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Sadowski committed Jul 5, 2017
1 parent 5a2f9d1 commit 91090df
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,13 @@ public class LanczosApproximationTest {
public void testG() {
Assert.assertEquals(607d / 128d, LanczosApproximation.g(), 0d);
}

@Test
public void testSomeValues() {
// Given that few values are checked, this test would only serve
// as early warning of unexpected changes to the current code.
Assert.assertEquals(29.020294557631818d, LanczosApproximation.value(0.1d), 0d);
Assert.assertEquals(13.14778027539684d, LanczosApproximation.value(1.0d), 0d);
Assert.assertEquals(7.897828855157814d, LanczosApproximation.value(2.0d), 0d);
}
}

0 comments on commit 91090df

Please sign in to comment.