Skip to content

Commit

Permalink
unit tests for rising factorial
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlogic committed Jan 27, 2024
1 parent 5cd6ba1 commit 0bc9be8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions shell.start
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import static arb.expressions.Expression.*;
import static arb.functions.real.RealFunction.*;
import static arb.RoundingMode.*;
import static arb.RealConstants.*;
import arb.MagnitudeConstants;
import arb.expressions.Expression;
import arb.functions.*;
import arb.RealConstants;
Expand Down
24 changes: 22 additions & 2 deletions src/test/java/arb/RealTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,28 @@
public class RealTest extends
TestCase
{

public void testRisingFactorialLong()
{
try ( Real real = new Real("6.9",
128))
{
Real y = real.risingFactorial(3, 128, new Real());
assertEquals(485.139, y.doubleValue());
}
}

public void testRisingFactorialReal()
{
try ( Real real = new Real("6.9",
128);
Real three = new Real("3",
128);)
{
Real y = real.risingFactorial(three, 128, new Real());
assertEquals(485.139, y.doubleValue());
}
}

public void testAddOneAndOne()
{
try ( Real real = new Real();)
Expand Down Expand Up @@ -40,7 +61,6 @@ public void testShift()
Real shifted = realInstance.shift(5);
assertEquals(5, shifted.size());


}
}

Expand Down

0 comments on commit 0bc9be8

Please sign in to comment.