Fixed a few test cases

Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6c9ae97c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6c9ae97c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6c9ae97c

Branch: refs/heads/TINKERPOP-1777
Commit: 6c9ae97c05b284717701e5da0153430af9c50ac6
Parents: 6f51fbd
Author: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Authored: Wed Feb 28 15:34:00 2018 -0700
Committer: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Committed: Fri Mar 2 10:41:36 2018 -0700

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                | 12 +++++--
 gremlin-test/features/branch/Union.feature      |  3 +-
 gremlin-test/features/map/Max.feature           | 29 ++++++++++++++++
 gremlin-test/features/map/Mean.feature          | 31 ++++++++++++++++-
 gremlin-test/features/map/Min.feature           | 29 ++++++++++++++++
 gremlin-test/features/map/Order.feature         |  7 ++--
 gremlin-test/features/map/Sum.feature           | 35 ++++++++++++++++++--
 gremlin-test/features/sideEffect/Group.feature  |  4 +--
 .../process/computer/GraphComputerTest.java     | 12 +++----
 .../traversal/step/branch/UnionTest.java        |  2 +-
 .../process/traversal/step/map/OrderTest.java   | 18 ++++------
 .../process/traversal/step/map/SumTest.java     | 18 +++++-----
 .../traversal/step/sideEffect/GroupTest.java    | 11 ++----
 13 files changed, 161 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index eb0a7e1..580708c 100644
--- 
a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -43,7 +43,15 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             { "g_V_valueMapXtrue_name_ageX", 
IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866
             { 
"g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name",
 IgnoreReason.NeedsFurtherInvestigation }, // TINKERPOP-1859??
             { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", 
IgnoreReason.NeedsFurtherInvestigation },    // TINKERPOP-1859??
-            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", 
IgnoreReason.NeedsFurtherInvestigation }  // TINKERPOP-1907
+            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", 
IgnoreReason.NeedsFurtherInvestigation },  // TINKERPOP-1907
+            { "g_V_foo_min", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_fold_minXlocalX", 
IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_max", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_fold_maxXlocalX", 
IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_mean", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_fold_meanXlocalX", 
IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_sum", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_fold_sumXlocalX", 
IgnoreReason.NeedsFurtherInvestigation }
         };
         
         private static class Keywords
@@ -384,4 +392,4 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             return rootDir.FullName;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/branch/Union.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Union.feature 
b/gremlin-test/features/branch/Union.feature
index 83318f6..8f5297e 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -135,7 +135,6 @@ Feature: Step - union()
       | d[3].l   |
       | d[0].l   |
       | d[1.9].d |
-      | d[0].i   |
       | d[0].l   |
       | d[1].l   |
 
@@ -151,4 +150,4 @@ Feature: Step - union()
     Then the result should be unordered
       | result |
       | d[1].l   |
-      | d[1].l   |
\ No newline at end of file
+      | d[1].l   |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/map/Max.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Max.feature 
b/gremlin-test/features/map/Max.feature
index ad0a270..7139f65 100644
--- a/gremlin-test/features/map/Max.feature
+++ b/gremlin-test/features/map/Max.feature
@@ -28,6 +28,35 @@ Feature: Step - max()
       | result |
       | d[35].i |
 
+  Scenario: g_V_foo_max
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").max()
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_age_fold_maxXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("age").fold().max(Scope.local)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[35].i |
+
+  Scenario: g_V_foo_fold_maxXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").fold().max(Scope.local)
+      """
+    When iterated to list
+    Then the result should be empty
+
   Scenario: g_V_repeatXbothX_timesX5X_age_max
     Given the modern graph
     And the traversal of

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/map/Mean.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Mean.feature 
b/gremlin-test/features/map/Mean.feature
index b109356..dc28ecb 100644
--- a/gremlin-test/features/map/Mean.feature
+++ b/gremlin-test/features/map/Mean.feature
@@ -28,6 +28,35 @@ Feature: Step - mean()
       | result |
       | d[30.75].d |
 
+  Scenario: g_V_foo_mean
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").mean()
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_age_fold_meanXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("age").fold().mean(Scope.local)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[30.75].d |
+
+  Scenario: g_V_foo_fold_meanXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").fold().mean(Scope.local)
+      """
+    When iterated to list
+    Then the result should be empty
+
   Scenario: g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_meanX
     Given the modern graph
     And the traversal of
@@ -37,4 +66,4 @@ Feature: Step - mean()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"ripple":"d[1.0].d","lop":"d[0.3333333333333333].d"}] |
\ No newline at end of file
+      | m[{"ripple":"d[1.0].d","lop":"d[0.3333333333333333].d"}] |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/map/Min.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Min.feature 
b/gremlin-test/features/map/Min.feature
index d77e9f3..6e3fb5d 100644
--- a/gremlin-test/features/map/Min.feature
+++ b/gremlin-test/features/map/Min.feature
@@ -28,6 +28,35 @@ Feature: Step - min()
       | result |
       | d[27].i |
 
+  Scenario: g_V_foo_min
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").min()
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_age_fold_minXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("age").fold().min(Scope.local)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[27].i |
+
+  Scenario: g_V_foo_fold_minXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").fold().min(Scope.local)
+      """
+    When iterated to list
+    Then the result should be empty
+
   Scenario: g_V_repeatXbothX_timesX5X_age_min
     Given the modern graph
     And the traversal of

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/map/Order.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Order.feature 
b/gremlin-test/features/map/Order.feature
index 6dd8ac4..8347ad2 100644
--- a/gremlin-test/features/map/Order.feature
+++ b/gremlin-test/features/map/Order.feature
@@ -192,13 +192,13 @@ Feature: Step - order()
     When iterated to list
     Then the result should be ordered
       | result |
-      | 
m[{"vadas":"d[0].i","peter":"d[0.2].d","josh":"d[1.4].d","marko":"d[1.9].d"}] |
+      | m[{"peter":"d[0.2].d","josh":"d[1.4].d","marko":"d[1.9].d"}] |
 
-  Scenario: g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX
+  Scenario: g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_decrX
     Given the modern graph
     And the traversal of
       """
-      
g.V().local(__.bothE().values("weight").fold()).order().by(__.sum(Scope.local), 
Order.decr)
+      
g.V().map(__.bothE().values("weight").fold()).order().by(__.sum(Scope.local), 
Order.decr)
       """
     When iterated to list
     Then the result should be ordered
@@ -233,7 +233,6 @@ Feature: Step - order()
       | m[{"marko":"d[1.9].d"}]  |
       | m[{"josh":"d[1.4].d"}]  |
       | m[{"peter":"d[0.2].d"}]  |
-      | m[{"vadas":"d[0].i"}]  |
 
   Scenario: 
g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX
     Given the modern graph

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/map/Sum.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Sum.feature 
b/gremlin-test/features/map/Sum.feature
index 2c89946..816fd2b 100644
--- a/gremlin-test/features/map/Sum.feature
+++ b/gremlin-test/features/map/Sum.feature
@@ -17,7 +17,7 @@
 
 Feature: Step - sum()
 
-  Scenario: g_V_valuesXageX_sum
+  Scenario: g_V_age_sum
     Given the modern graph
     And the traversal of
       """
@@ -26,7 +26,36 @@ Feature: Step - sum()
     When iterated to list
     Then the result should be unordered
       | result |
-      | d[123].l |
+      | d[123].i |
+
+  Scenario: g_V_foo_sum
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").sum()
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_age_fold_sumXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("age").fold().sum(Scope.local)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[123].i |
+
+  Scenario: g_V_foo_fold_sumXlocalX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").fold().sum(Scope.local)
+      """
+    When iterated to list
+    Then the result should be empty
 
   Scenario: g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_sumX
     Given the modern graph
@@ -37,4 +66,4 @@ Feature: Step - sum()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"ripple":"d[1.0].d","lop":"d[1.0].d"}] |
\ No newline at end of file
+      | m[{"ripple":"d[1.0].d","lop":"d[1.0].d"}] |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/features/sideEffect/Group.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Group.feature 
b/gremlin-test/features/sideEffect/Group.feature
index 94d2191..2686f09 100644
--- a/gremlin-test/features/sideEffect/Group.feature
+++ b/gremlin-test/features/sideEffect/Group.feature
@@ -101,7 +101,7 @@ Feature: Step - group()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"software":"d[0].i", "person":"d[3.5].d"}] |
+      | m[{"person":"d[3.5].d"}] |
 
   Scenario: g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX
     Given the grateful graph
@@ -207,7 +207,7 @@ Feature: Step - group()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"cover":{"followedBy":"d[777982].l", "sungBy":"d[0].i", 
"writtenBy":"d[0].i"}, "":{"followedBy":"d[179350].l"}, 
"original":{"followedBy":"d[2185613].l", "sungBy":"d[0].i", 
"writtenBy":"d[0].i"}}] |
+      | m[{"cover":{"followedBy":"d[777982].l"}, 
"":{"followedBy":"d[179350].l"}, "original":{"followedBy":"d[2185613].l"}}] |
 
   Scenario: g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX
     Given the modern graph

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 2f4f103..228b975 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -1347,13 +1347,13 @@ public class GraphComputerTest extends 
AbstractGremlinProcessTest {
             assertEquals(Long.valueOf(0l), 
result.graph().traversal().E().count().next());
             assertEquals(Long.valueOf(0l), 
result.graph().traversal().V().values().count().next());
             assertEquals(Long.valueOf(0l), 
result.graph().traversal().E().values().count().next());
-            assertEquals(0, 
result.graph().traversal().V().values("money").sum().next());
+            
assertFalse(result.graph().traversal().V().values("money").sum().hasNext());
             ///
             assertEquals(Long.valueOf(6l), 
graph.traversal().V().count().next());
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().count().next());
             assertEquals(Long.valueOf(12l), 
graph.traversal().V().values().count().next());
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().values().count().next());
-            assertEquals(0, 
graph.traversal().V().values("money").sum().next());
+            assertFalse(graph.traversal().V().values("money").sum().hasNext());
         }
     }
 
@@ -1373,7 +1373,7 @@ public class GraphComputerTest extends 
AbstractGremlinProcessTest {
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().count().next());
             assertEquals(Long.valueOf(12l), 
graph.traversal().V().values().count().next());
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().values().count().next());
-            assertEquals(0, 
graph.traversal().V().values("money").sum().next());
+            assertFalse(graph.traversal().V().values("money").sum().hasNext());
         }
     }
 
@@ -1393,7 +1393,7 @@ public class GraphComputerTest extends 
AbstractGremlinProcessTest {
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().count().next());
             assertEquals(Long.valueOf(12l), 
graph.traversal().V().values().count().next());
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().values().count().next());
-            assertEquals(0, 
graph.traversal().V().values("money").sum().next());
+            assertFalse(graph.traversal().V().values("money").sum().hasNext());
         }
     }
 
@@ -1407,13 +1407,13 @@ public class GraphComputerTest extends 
AbstractGremlinProcessTest {
             assertEquals(Long.valueOf(6l), 
result.graph().traversal().E().count().next());
             assertEquals(Long.valueOf(12l), 
result.graph().traversal().V().values().count().next());
             assertEquals(Long.valueOf(6l), 
result.graph().traversal().E().values().count().next());
-            assertEquals(0, 
result.graph().traversal().V().values("money").sum().next());
+            
assertFalse(result.graph().traversal().V().values("money").sum().hasNext());
             ///
             assertEquals(Long.valueOf(6l), 
graph.traversal().V().count().next());
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().count().next());
             assertEquals(Long.valueOf(12l), 
graph.traversal().V().values().count().next());
             assertEquals(Long.valueOf(6l), 
graph.traversal().E().values().count().next());
-            assertEquals(0, 
graph.traversal().V().values("money").sum().next());
+            assertFalse(graph.traversal().V().values("money").sum().hasNext());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
index 1c06943..bbe5eff 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
@@ -135,7 +135,7 @@ public abstract class UnionTest extends 
AbstractGremlinProcessTest {
     public void 
g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX() {
         final Traversal<Vertex, Number> traversal = 
get_g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX(convertToVertexId("marko"),
 convertToVertexId("vadas"));
         printTraversalForm(traversal);
-        checkResults(Arrays.asList(0l, 0l, 0, 3l, 1l, 1.9d), traversal);
+        checkResults(Arrays.asList(3L, 0L, 1.9, 0L, 1L), traversal);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
index bbf63ef..d5cd6fd 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
@@ -76,7 +76,7 @@ public abstract class OrderTest extends 
AbstractGremlinProcessTest {
 
     public abstract Traversal<Vertex, Map<String, List<Vertex>>> 
get_g_V_group_byXlabelX_byXname_order_byXdecrX_foldX();
 
-    public abstract Traversal<Vertex, List<Double>> 
get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX();
+    public abstract Traversal<Vertex, List<Double>> 
get_g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_decrX();
 
     public abstract Traversal<Vertex, Map<String, Object>> 
get_g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX();
 
@@ -244,8 +244,8 @@ public abstract class OrderTest extends 
AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
-        final Traversal<Vertex, List<Double>> traversal = 
get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX();
+    public void g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
+        final Traversal<Vertex, List<Double>> traversal = 
get_g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_decrX();
         final List<List<Double>> list = traversal.toList();
         assertEquals(list.get(0).size(), 3);
         assertEquals(list.get(1).size(), 3);
@@ -386,12 +386,9 @@ public abstract class OrderTest extends 
AbstractGremlinProcessTest {
         assertTrue(traversal.hasNext());
         final Map<String, Number> m = traversal.next();
         assertFalse(traversal.hasNext());
-        assertEquals(4, m.size());
+        assertEquals(3, m.size());
         final Iterator<Map.Entry<String, Number>> iterator = 
m.entrySet().iterator();
         Map.Entry<String, Number> entry = iterator.next();
-        assertEquals("vadas", entry.getKey());
-        assertEquals(0.0, entry.getValue().doubleValue(), 0.0001);
-        entry = iterator.next();
         assertEquals("peter", entry.getKey());
         assertEquals(0.2, entry.getValue().doubleValue(), 0.0001);
         entry = iterator.next();
@@ -417,9 +414,6 @@ public abstract class OrderTest extends 
AbstractGremlinProcessTest {
         entry = traversal.next();
         assertEquals("peter", entry.getKey());
         assertEquals(0.2, entry.getValue().doubleValue(), 0.0001);
-        entry = traversal.next();
-        assertEquals("vadas", entry.getKey());
-        assertEquals(0.0, entry.getValue().doubleValue(), 0.0001);
         assertFalse(traversal.hasNext());
     }
 
@@ -485,8 +479,8 @@ public abstract class OrderTest extends 
AbstractGremlinProcessTest {
         }
 
         @Override
-        public Traversal<Vertex, List<Double>> 
get_g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
-            return 
g.V().local(__.bothE().<Double>values("weight").fold()).order().by(__.sum(Scope.local),
 Order.decr);
+        public Traversal<Vertex, List<Double>> 
get_g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_decrX() {
+            return 
g.V().map(__.bothE().<Double>values("weight").fold()).order().by(__.sum(Scope.local),
 Order.decr);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
index e1bbd0b..f8bfbcb 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SumTest.java
@@ -40,9 +40,9 @@ import static org.junit.Assert.*;
 @RunWith(GremlinProcessRunner.class)
 public abstract class SumTest extends AbstractGremlinProcessTest {
 
-    public abstract Traversal<Vertex, Integer> get_g_V_valuesXageX_sum();
+    public abstract Traversal<Vertex, Number> get_g_V_age_sum();
 
-    public abstract Traversal<Vertex, Integer> get_g_V_age_fold_sumXlocalX();
+    public abstract Traversal<Vertex, Number> get_g_V_age_fold_sumXlocalX();
 
     public abstract Traversal<Vertex, Number> get_g_V_foo_sum();
 
@@ -52,10 +52,10 @@ public abstract class SumTest extends 
AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_valuesXageX_sum() {
-        final Traversal<Vertex, Integer> traversal = get_g_V_valuesXageX_sum();
+    public void g_V_age_sum() {
+        final Traversal<Vertex, Number> traversal = get_g_V_age_sum();
         printTraversalForm(traversal);
-        final Integer sum = traversal.next();
+        final Number sum = traversal.next();
         assertEquals(123, sum.intValue());
         assertFalse(traversal.hasNext());
     }
@@ -63,9 +63,9 @@ public abstract class SumTest extends 
AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_V_age_fold_sumXlocalX() {
-        final Traversal<Vertex, Integer> traversal = 
get_g_V_age_fold_sumXlocalX();
+        final Traversal<Vertex, Number> traversal = 
get_g_V_age_fold_sumXlocalX();
         printTraversalForm(traversal);
-        final Integer sum = traversal.next();
+        final Number sum = traversal.next();
         assertEquals(123, sum.intValue());
         assertFalse(traversal.hasNext());
     }
@@ -102,12 +102,12 @@ public abstract class SumTest extends 
AbstractGremlinProcessTest {
     public static class Traversals extends SumTest {
 
         @Override
-        public Traversal<Vertex, Integer> get_g_V_valuesXageX_sum() {
+        public Traversal<Vertex, Number> get_g_V_age_sum() {
             return g.V().values("age").sum();
         }
 
         @Override
-        public Traversal<Vertex, Integer> get_g_V_age_fold_sumXlocalX() {
+        public Traversal<Vertex, Number> get_g_V_age_fold_sumXlocalX() {
             return g.V().values("age").fold().sum(Scope.local);
         }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c9ae97c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java
index 3e1e53b..6a58aa7 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupTest.java
@@ -218,8 +218,7 @@ public abstract class GroupTest extends 
AbstractGremlinProcessTest {
         assertTrue(traversal.hasNext());
         final Map<String, Number> map = traversal.next();
         assertFalse(traversal.hasNext());
-        assertEquals(2, map.size());
-        assertEquals(0, map.get("software"));
+        assertEquals(1, map.size());
         assertEquals(3.5d, (double) map.get("person"), 0.01d);
         checkSideEffects(traversal.asAdmin().getSideEffects(), "a", 
HashMap.class);
     }
@@ -424,16 +423,12 @@ public abstract class GroupTest extends 
AbstractGremlinProcessTest {
         assertEquals(179350, subMap.get("followedBy").intValue());
         //
         subMap = map.get("original");
-        assertEquals(3, subMap.size());
+        assertEquals(1, subMap.size());
         assertEquals(2185613, subMap.get("followedBy").intValue());
-        assertEquals(0, subMap.get("writtenBy").intValue());
-        assertEquals(0, subMap.get("sungBy").intValue());
         //
         subMap = map.get("cover");
-        assertEquals(3, subMap.size());
+        assertEquals(1, subMap.size());
         assertEquals(777982, subMap.get("followedBy").intValue());
-        assertEquals(0, subMap.get("writtenBy").intValue());
-        assertEquals(0, subMap.get("sungBy").intValue());
     }
 
     @Test

Reply via email to