Skip to main content

[el-spec commits] [el-spec~source-code:81] Add Fibonacci test.

  • From: kchung@...
  • To: commits@...
  • Subject: [el-spec commits] [el-spec~source-code:81] Add Fibonacci test.
  • Date: Fri, 20 Apr 2012 22:19:35 +0000

Project:    el-spec
Repository: source-code
Revision:   81
Author:     kchung
Date:       2012-04-20 22:19:33 UTC
Link:       

Log Message:
------------
Add Fibonacci test.



Revisions:
----------
81


Modified Paths:
---------------
trunk/impl/src/test/java/org/glassfish/el/test/LambdaTest.java


Diffs:
------
Index: trunk/impl/src/test/java/org/glassfish/el/test/LambdaTest.java
===================================================================
--- trunk/impl/src/test/java/org/glassfish/el/test/LambdaTest.java      
(revision 80)
+++ trunk/impl/src/test/java/org/glassfish/el/test/LambdaTest.java      
(revision 81)
@@ -55,6 +55,7 @@
     public void testFact() {
         ELProcessor elp = new ELProcessor();        
         testExpr(elp, "factorial", "fact = n->n==0? 1: n*fact(n-1); 
fact(5)", 120L);
+        testExpr(elp, "fibonacci", "f = n->n==0? 0: n==1? 1: f(n-1)+f(n-2); 
f(10)", 55L);
     }
 
     @Test





[el-spec commits] [el-spec~source-code:81] Add Fibonacci test.

kchung 04/20/2012
 
 
Close
loading
Please Confirm
Close