You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/04/13 22:38:37 UTC
[1/5] incubator-tinkerpop git commit: Add more tests to enforce type
relaxation on queries in a traversal.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 70aaea789 -> 36ce5143d
Add more tests to enforce type relaxation on queries in a traversal.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/f273a565
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/f273a565
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/f273a565
Branch: refs/heads/master
Commit: f273a5655e6aa1ad5a0189d83c4f9f232954f847
Parents: 8d968fd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 14:07:05 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 14:07:05 2015 -0400
----------------------------------------------------------------------
.../traversal/step/map/GroovyVertexTest.groovy | 10 ++++++
.../process/traversal/step/map/VertexTest.java | 38 ++++++++++++++++++++
2 files changed, 48 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f273a565/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
index 2951c47..4edb264 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
@@ -62,6 +62,11 @@ public abstract class GroovyVertexTest {
}
@Override
+ public Traversal<Edge, Edge> get_g_EX11X(Object e11Id) {
+ g.E(e11Id);
+ }
+
+ @Override
public Traversal<Vertex, Edge> get_g_VX1X_outE(final Object v1Id) {
g.V(v1Id).outE
}
@@ -191,6 +196,11 @@ public abstract class GroovyVertexTest {
}
@Override
+ public Traversal<Edge, Edge> get_g_EX11X(Object e11Id) {
+ ComputerTestHelper.compute("g.E($e11Id)", g)
+ }
+
+ @Override
public Traversal<Vertex, Edge> get_g_VX1X_outE(final Object v1Id) {
ComputerTestHelper.compute("g.V(${v1Id}).outE", g);
}
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f273a565/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
index 90a07ec..098615c 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
@@ -55,6 +55,8 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
public abstract Traversal<Edge, Edge> get_g_E();
+ public abstract Traversal<Edge, Edge> get_g_EX11X(final Object e11Id);
+
public abstract Traversal<Vertex, Edge> get_g_VX1X_outE(final Object v1Id);
public abstract Traversal<Vertex, Edge> get_g_VX2X_inE(final Object v2Id);
@@ -190,6 +192,30 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
@Test
@LoadGraphWith(MODERN)
+ public void g_EX11X() {
+ final Object edgeId = convertToEdgeId("josh", "created", "lop");
+ final Traversal<Edge, Edge> traversal = get_g_EX11X(edgeId);
+ assert_g_EX11X(edgeId, traversal);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_EX11AsStringX() {
+ final Object edgeId = convertToEdgeId("josh", "created", "lop");
+ final Traversal<Edge, Edge> traversal = get_g_EX11X(edgeId.toString());
+ assert_g_EX11X(edgeId, traversal);
+ }
+
+ private void assert_g_EX11X(final Object edgeId, final Traversal<Edge, Edge> traversal) {
+ printTraversalForm(traversal);
+ assertTrue(traversal.hasNext());
+ final Edge e = traversal.next();
+ assertEquals(edgeId, e.id());
+ assertFalse(traversal.hasNext());
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
public void g_VX1X_outE() {
final Traversal<Vertex, Edge> traversal = get_g_VX1X_outE(convertToVertexId("marko"));
printTraversalForm(traversal);
@@ -384,6 +410,13 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
assert_g_v1_outXknowsX(traversal);
}
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_VX1X_outXknowsAsStringIdX() {
+ final Traversal<Vertex, Vertex> traversal = get_g_VX1X_outXknowsX(convertToVertexId("marko").toString());
+ assert_g_v1_outXknowsX(traversal);
+ }
+
private void assert_g_v1_outXknowsX(final Traversal<Vertex, Vertex> traversal) {
printTraversalForm(traversal);
int counter = 0;
@@ -609,5 +642,10 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
public Traversal<Vertex, Vertex> get_g_VX1X_to_XOUT_knowsX(final Object v1Id) {
return g.V(v1Id).to(Direction.OUT, "knows");
}
+
+ @Override
+ public Traversal<Edge, Edge> get_g_EX11X(final Object e11Id) {
+ return g.E(e11Id);
+ }
}
}
[3/5] incubator-tinkerpop git commit: Add tests to enforce Element
equality.
Posted by sp...@apache.org.
Add tests to enforce Element equality.
This makes it so that both the id() and id().toString() both can be used to evaluate equality. The toString() of an id() is now a first-class representation of an identifier. See TINKERPOP3-581 for more details
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/bb86121a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/bb86121a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/bb86121a
Branch: refs/heads/master
Commit: bb86121ae7bd24bf2da030d300d5fcf5b65049db
Parents: 0c16dc8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 16:32:59 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 16:32:59 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/structure/EdgeTest.java | 29 ++++++++++++++++++
.../gremlin/structure/VertexPropertyTest.java | 31 ++++++++++++++++++++
.../tinkerpop/gremlin/structure/VertexTest.java | 25 ++++++++++++++++
3 files changed, 85 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bb86121a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
index 67eedf3..54368a6 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java
@@ -54,6 +54,35 @@ public class EdgeTest {
})
public static class BasicEdgeTest extends AbstractGremlinTest {
@Test
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+ public void shouldValidateEquality() {
+ final Vertex v = graph.addVertex();
+ final Edge e1 = v.addEdge("self", v);
+ final Edge e2 = v.addEdge("self", v);
+
+ assertEquals(e1, e1);
+ assertEquals(e2, e2);
+ assertNotEquals(e1, e2);
+ }
+
+ @Test
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+ public void shouldValidateIdEquality() {
+ final Vertex v = graph.addVertex();
+ final Edge e1 = v.addEdge("self", v);
+ final Edge e2 = v.addEdge("self", v);
+
+ assertEquals(e1.id(), e1.id());
+ assertEquals(e2.id(), e2.id());
+ assertEquals(e1.id().toString(), e1.id().toString());
+ assertEquals(e2.id().toString(), e2.id().toString());
+ assertNotEquals(e1.id(), e2.id());
+ assertNotEquals(e1.id().toString(), e2.id().toString());
+ }
+
+ @Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
public void shouldHaveStandardStringRepresentation() {
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bb86121a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
index 35fbf73..099108d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java
@@ -49,6 +49,37 @@ import static org.junit.Assert.*;
@RunWith(Enclosed.class)
public class VertexPropertyTest extends AbstractGremlinTest {
+ public static class BasicVertexProperty extends AbstractGremlinTest {
+ @Test
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
+ public void shouldValidateEquality() {
+ final Vertex v = graph.addVertex();
+ final VertexProperty vp1 = v.property("x", 0);
+ final VertexProperty vp2 = v.property("y", 1);
+
+ assertEquals(vp1, vp1);
+ assertEquals(vp2, vp2);
+ assertNotEquals(vp1, vp2);
+ }
+
+ @Test
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
+ public void shouldValidateIdEquality() {
+ final Vertex v = graph.addVertex();
+ final VertexProperty vp1 = v.property("x", 0);
+ final VertexProperty vp2 = v.property("y", 1);
+
+ assertEquals(vp1.id(), vp1.id());
+ assertEquals(vp2.id(), vp2.id());
+ assertEquals(vp1.id().toString(), vp1.id().toString());
+ assertEquals(vp2.id().toString(), vp2.id().toString());
+ assertNotEquals(vp1.id(), vp2.id());
+ assertNotEquals(vp1.id().toString(), vp2.id().toString());
+ }
+ }
+
public static class VertexPropertyAddition extends AbstractGremlinTest {
@Test
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bb86121a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
index de2a20e..bbbf184 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
@@ -164,6 +164,31 @@ public class VertexTest {
public static class BasicVertexTest extends AbstractGremlinTest {
@Test
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ public void shouldValidateEquality() {
+ final Vertex v1 = graph.addVertex();
+ final Vertex v2 = graph.addVertex();
+
+ assertEquals(v1, v1);
+ assertEquals(v2, v2);
+ assertNotEquals(v1, v2);
+ }
+
+ @Test
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ public void shouldValidateIdEquality() {
+ final Vertex v1 = graph.addVertex();
+ final Vertex v2 = graph.addVertex();
+
+ assertEquals(v1.id(), v1.id());
+ assertEquals(v2.id(), v2.id());
+ assertEquals(v1.id().toString(), v1.id().toString());
+ assertEquals(v2.id().toString(), v2.id().toString());
+ assertNotEquals(v1.id(), v2.id());
+ assertNotEquals(v1.id().toString(), v2.id().toString());
+ }
+
+ @Test
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
public void shouldHaveExceptionConsistencyWhenUsingNullVertexLabel() {
try {
graph.addVertex(T.label, null);
[5/5] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/master'
Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/36ce5143
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/36ce5143
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/36ce5143
Branch: refs/heads/master
Commit: 36ce5143da3bc602eb46d381c69ce1c8782c038d
Parents: 3e05764 70aaea7
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 16:38:22 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 16:38:22 2015 -0400
----------------------------------------------------------------------
.../gremlin/structure/util/star/StarGraph.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[2/5] incubator-tinkerpop git commit: Add tests for g.V/E where
string values of the id are present as a filter.
Posted by sp...@apache.org.
Add tests for g.V/E where string values of the id are present as a filter.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0c16dc86
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0c16dc86
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0c16dc86
Branch: refs/heads/master
Commit: 0c16dc8650f7f0f149c4c2c5b315bd2b481f8073
Parents: f273a56
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 16:22:36 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 16:22:36 2015 -0400
----------------------------------------------------------------------
.../gremlin/process/traversal/step/util/HasContainer.java | 4 +++-
.../tinkerpop/gremlin/structure/util/ElementHelper.java | 7 +++++--
.../process/traversal/step/map/GroovyVertexTest.groovy | 4 ++--
3 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0c16dc86/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
index cc98041..c69e90b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
@@ -62,8 +62,10 @@ public final class HasContainer implements Serializable {
public boolean test(final Element element) {
if (null != this.value) {
+ // it is OK to evaluate equality of ids via toString() now given that the toString() the test suite
+ // enforces the value of id.()toString() to be a first class representation of the identifier
if (this.key.equals(T.id.getAccessor()))
- return this.predicate.test(element.id(), this.value);
+ return this.predicate.test(element.id().toString(), this.value.toString());
else if (this.key.equals(T.label.getAccessor()))
return this.predicate.test(element.label(), this.value);
else if (element instanceof VertexProperty && this.key.equals(T.value.getAccessor()))
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0c16dc86/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java
index 94d4a5b..e6a39a6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java
@@ -503,10 +503,13 @@ public final class ElementHelper {
public static boolean idExists(final Object id, final Object... providedIds) {
if (0 == providedIds.length) return true;
- if (1 == providedIds.length) return id.equals(providedIds[0]);
+
+ // it is OK to evaluate equality of ids via toString() now given that the toString() the test suite
+ // enforces the value of id.()toString() to be a first class representation of the identifier
+ if (1 == providedIds.length) return id.toString().equals(providedIds[0].toString());
else {
for (final Object temp : providedIds) {
- if (temp.equals(id))
+ if (temp.toString().equals(id.toString()))
return true;
}
return false;
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0c16dc86/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
index 4edb264..bb3506c 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
@@ -62,7 +62,7 @@ public abstract class GroovyVertexTest {
}
@Override
- public Traversal<Edge, Edge> get_g_EX11X(Object e11Id) {
+ public Traversal<Edge, Edge> get_g_EX11X(final Object e11Id) {
g.E(e11Id);
}
@@ -196,7 +196,7 @@ public abstract class GroovyVertexTest {
}
@Override
- public Traversal<Edge, Edge> get_g_EX11X(Object e11Id) {
+ public Traversal<Edge, Edge> get_g_EX11X(final Object e11Id) {
ComputerTestHelper.compute("g.E($e11Id)", g)
}
[4/5] incubator-tinkerpop git commit: Add test for has() step to
cover a lookup over a toString'd id.
Posted by sp...@apache.org.
Add test for has() step to cover a lookup over a toString'd id.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/3e057649
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/3e057649
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/3e057649
Branch: refs/heads/master
Commit: 3e05764955c8974ac5eed17e1121d4e29e70a1f4
Parents: bb86121
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 13 16:37:42 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 13 16:37:42 2015 -0400
----------------------------------------------------------------------
.../gremlin/process/traversal/step/filter/HasTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3e057649/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index 7e898de..b26af93 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -153,6 +153,17 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
@LoadGraphWith(MODERN)
public void g_VX1X_out_hasXid_2X() {
final Traversal<Vertex, Vertex> traversal = get_g_VX1X_out_hasIdX2X(convertToVertexId("marko"), convertToVertexId("vadas"));
+ assert_g_VX1X_out_hasXid_2X(traversal);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_VX1AsStringX_out_hasXid_2AsStringX() {
+ final Traversal<Vertex, Vertex> traversal = get_g_VX1X_out_hasIdX2X(convertToVertexId("marko").toString(), convertToVertexId("vadas").toString());
+ assert_g_VX1X_out_hasXid_2X(traversal);
+ }
+
+ private void assert_g_VX1X_out_hasXid_2X(Traversal<Vertex, Vertex> traversal) {
printTraversalForm(traversal);
assertTrue(traversal.hasNext());
assertEquals(convertToVertexId("vadas"), traversal.next().id());