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 2021/02/08 18:38:19 UTC
[tinkerpop] branch master updated (dc8b60e -> f52fabd)
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.
from dc8b60e Merge branch 'TINKERPOP-2395'
add 76bc8c9 fix toString() for P class in when value is array
add 05c323a Tests for P#toString() in javascript CTR
new f52fabd Merge branch '3.4-dev'
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGELOG.asciidoc | 1 +
.../gremlin-javascript/lib/process/traversal.js | 9 ++++++++-
.../gremlin-javascript/test/unit/traversal-test.js | 15 +++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
[tinkerpop] 01/01: Merge branch '3.4-dev'
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit f52fabdf31b28fd7c4f9b23ce675582ec2a549c1
Merge: dc8b60e 05c323a
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Mon Feb 8 13:36:58 2021 -0500
Merge branch '3.4-dev'
CHANGELOG.asciidoc | 1 +
.../gremlin-javascript/lib/process/traversal.js | 9 ++++++++-
.../gremlin-javascript/test/unit/traversal-test.js | 15 +++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/traversal-test.js
index 0f4be9e,b56f824..273f2c4
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/traversal-test.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/traversal-test.js
@@@ -25,10 -25,8 +25,11 @@@
const assert = require('assert');
const expect = require('chai').expect;
const graph = require('../../lib/structure/graph');
+const anon = require('../../lib/process/anonymous-traversal');
const t = require('../../lib/process/traversal');
+const gt = require('../../lib/process/graph-traversal');
+const V = gt.statics.V;
+ const P = t.P;
const Bytecode = require('../../lib/process/bytecode');
const TraversalStrategies = require('../../lib/process/traversal-strategy').TraversalStrategies;
@@@ -218,16 -216,17 +219,30 @@@ describe('Traversal', function ()
});
});
+ describe('P#toString()', function () {
+ it('convert to string representation with P', function () {
+ assert.strictEqual(P.gt(18).toString(), 'gt(18)');
+ });
+
+ it('convert to string representation with P.within', function () {
+ assert.strictEqual(P.within('a', 'b').toString(), 'within(\'a\',\'b\')');
+ });
+
+ it('convert to string representation with P.within array', function () {
+ assert.strictEqual(P.within(['a', 'b']).toString(), 'within(\'a\',\'b\')');
+ });
+ });
++
+ describe("build", function() {
+ it('should only allow anonymous child traversals', function() {
+ const g = anon.traversal().withGraph(new graph.Graph());
+ assert.doesNotThrow(function() {
+ g.V(0).addE("self").to(V(1))
+ });
+
+ assert.throws(function() {
+ g.V(0).addE("self").to(g.V(1))
+ });
+ })
+ });
});