Skip to content

Commit

Permalink
CTR make translator tests for SubgraphStrategy ignore parameter order
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazcy committed Sep 29, 2023
1 parent 4173f42 commit 974b450
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gremlin-go/driver/translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ func Test_translator_Translate(t *testing.T) {
assert: func(g *GraphTraversalSource) *GraphTraversal {
return g.WithStrategies(SubgraphStrategy(SubgraphStrategyConfig{Vertices: T__.Has("region", "US-TX"), Edges: T__.HasLabel("route")})).V().Count()
},
equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()",
containsRandomClassParams: true,
equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()",
},
{
assert: func(g *GraphTraversalSource) *GraphTraversal {
Expand All @@ -580,13 +581,15 @@ func Test_translator_Translate(t *testing.T) {
assert: func(g *GraphTraversalSource) *GraphTraversal {
return g.WithStrategies(SubgraphStrategy(SubgraphStrategyConfig{Vertices: T__.Has("region", "US-TX"), VertexProperties: T__.HasNot("runways")})).V().Count()
},
equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),vertexProperties:hasNot('runways'))).V().count()",
containsRandomClassParams: true,
equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),vertexProperties:hasNot('runways'))).V().count()",
},
{
assert: func(g *GraphTraversalSource) *GraphTraversal {
return g.WithStrategies(ReadOnlyStrategy(), SubgraphStrategy(SubgraphStrategyConfig{Vertices: T__.Has("region", "US-TX"), Edges: T__.HasLabel("route")})).V().Count()
},
equals: "g.withStrategies(new ReadOnlyStrategy(),new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()",
containsRandomClassParams: true,
equals: "g.withStrategies(new ReadOnlyStrategy(),new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()",
},
{
assert: func(g *GraphTraversalSource) *GraphTraversal {
Expand Down

0 comments on commit 974b450

Please sign in to comment.