tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [37/50] tinkerpop git commit: TINKERPOP-1784 Added feature tests for or()
Date Thu, 26 Oct 2017 17:15:29 GMT
TINKERPOP-1784 Added feature tests for or()


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

Branch: refs/heads/TINKERPOP-1784
Commit: be247246e6992ba9ba3eaf65367a439f3f7b1f69
Parents: 3aa6251
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Fri Oct 20 14:06:15 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Oct 26 13:14:37 2017 -0400

----------------------------------------------------------------------
 gremlin-test/features/filter/Or.feature         | 59 ++++++++++++++++++++
 .../gremlin/process/FeatureCoverageTest.java    |  2 +
 2 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be247246/gremlin-test/features/filter/Or.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Or.feature b/gremlin-test/features/filter/Or.feature
new file mode 100644
index 0000000..111315a
--- /dev/null
+++ b/gremlin-test/features/filter/Or.feature
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+Feature: Step - or()
+
+  Scenario: g_V_orXhasXage_gt_27X__outE_count_gte_2X_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().or(__.has("age", P.gt(27)), __.outE().count().is(P.gte(2l))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | marko |
+      | josh  |
+      | peter |
+
+  Scenario: g_V_orXoutEXknowsX__hasXlabel_softwareX_or_hasXage_gte_35XX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().or(__.outE("knows"), __.has(T.label, "software").or().has("age", P.gte(35))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | marko |
+      | ripple |
+      | lop  |
+      | peter |
+
+  Scenario: g_V_asXaX_orXselectXaX_selectXaXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").or(__.select("a"), __.select("a"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | v[marko] |
+      | v[vadas] |
+      | v[lop] |
+      | v[josh] |
+      | v[ripple] |
+      | v[peter]  |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/be247246/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 97f1fd6..282d8a8 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
 import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
@@ -75,6 +76,7 @@ public class FeatureCoverageTest {
                 CoinTest.class,
                 DropTest.class,
                 IsTest.class,
+                OrTest.class,
                 // map
                 CountTest.class,
                 PathTest.class,


Mime
View raw message