test for double factorial
This commit is contained in:
parent
6a7f490d64
commit
457cb4db0c
@ -109,6 +109,7 @@ public class CalculatorEngineTest {
|
|||||||
junit.framework.Assert.assertEquals("120", cm.evaluate(JsclOperation.numeric, "(2+2+1)!").getResult());
|
junit.framework.Assert.assertEquals("120", cm.evaluate(JsclOperation.numeric, "(2+2+1)!").getResult());
|
||||||
junit.framework.Assert.assertEquals("24", cm.evaluate(JsclOperation.numeric, "(2.0+2.0)!").getResult());
|
junit.framework.Assert.assertEquals("24", cm.evaluate(JsclOperation.numeric, "(2.0+2.0)!").getResult());
|
||||||
junit.framework.Assert.assertEquals("24", cm.evaluate(JsclOperation.numeric, "4.0!").getResult());
|
junit.framework.Assert.assertEquals("24", cm.evaluate(JsclOperation.numeric, "4.0!").getResult());
|
||||||
|
junit.framework.Assert.assertEquals("720", cm.evaluate(JsclOperation.numeric, "3!!").getResult());
|
||||||
junit.framework.Assert.assertEquals("36.0", Expression.valueOf("3!^2").numeric().toString());
|
junit.framework.Assert.assertEquals("36.0", Expression.valueOf("3!^2").numeric().toString());
|
||||||
junit.framework.Assert.assertEquals("3.0", Expression.valueOf("cubic(27)").numeric().toString());
|
junit.framework.Assert.assertEquals("3.0", Expression.valueOf("cubic(27)").numeric().toString());
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user