Skip to main content

[el-spec commits] [el-spec~source-code:48] Fixes

  • From: kchung@...
  • To: commits@...
  • Subject: [el-spec commits] [el-spec~source-code:48] Fixes
  • Date: Sat, 4 Feb 2012 01:52:10 +0000

Project:    el-spec
Repository: source-code
Revision:   48
Author:     kchung
Date:       2012-02-04 01:52:09 UTC
Link:       

Log Message:
------------
Fixes



Revisions:
----------
48


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


Diffs:
------
Index: trunk/impl/src/test/java/org/glassfish/el/test/LinqTest.java
===================================================================
--- trunk/impl/src/test/java/org/glassfish/el/test/LinqTest.java        
(revision 47)
+++ trunk/impl/src/test/java/org/glassfish/el/test/LinqTest.java        
(revision 48)
@@ -295,11 +295,26 @@
     public void testMin() {
         testIterable("min",
             "products.groupBy(p->p.category).\n" +
-            "         select(g->[g.key, g.min(p->p,unitPrice)])",
+            "         select(g->[g.key, g.min(p->p.unitPrice)])",
             exp15);
     }
 
+    static String[] exp16 = {
+        "[book, History of Golf]",
+        "[dvd, Coming Home]",
+        "[cd, Greatest Hits]" };
+
     @Test
+    public void testAggregate() {
+        testIterable("aggregate",
+            "products.groupBy(p->p.category).\n" +
+            "         select(g->[g.key,\n" +
+            "                    g.select(p->p.name).\n" +
+            "                      
aggregate((s,t)->t.length()>s.length()?t:s)])",
+            exp16);
+    }
+
+    @Test
     public void testDistinct() {
         testIterable("distinct",
            " ['a', 'b', 'b', 'c'].distinct()",





[el-spec commits] [el-spec~source-code:48] Fixes

kchung 02/04/2012
 
 
Close
loading
Please Confirm
Close