Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Apr 1, 2021
1 parent 86bf0e5 commit b0af2be
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 20 deletions.
24 changes: 13 additions & 11 deletions tests/tck/features/path/ShortestPath.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Feature: Integer Vid Shortest Path
FIND SHORTEST PATH FROM hash("Tiago Splitter") TO hash("Tim Duncan") OVER * UPTO 1 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| ("Tiago Splitter")-[:like]->("Tim Duncan") |
| path |
| <("Tiago Splitter")-[:like]->("Tim Duncan")> |

Scenario: Integer Vid [1] MultiPair Shortest Path
When executing query:
Expand Down Expand Up @@ -124,10 +124,10 @@ Feature: Integer Vid Shortest Path
FIND SHORTEST PATH FROM hash("Yao Ming") TO hash("Tim Duncan"), hash("Spurs"), hash("Lakers") OVER * UPTO 2 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:like]->("Tim Duncan") |
| <("Yao Ming")-[:like]->("Tracy McGrady")-[:serve]->("Spurs")> |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:serve]->("Lakers")> |
| path |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:like]->("Tim Duncan")> |
| <("Yao Ming")-[:like]->("Tracy McGrady")-[:serve]->("Spurs")> |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:serve]->("Lakers")> |

Scenario: Integer Vid [5] MultiPair Shortest Path
When executing query:
Expand Down Expand Up @@ -414,11 +414,13 @@ Feature: Integer Vid Shortest Path
FIND SHORTEST PATH FROM hash("Tony Parker"), hash("Yao Ming") TO hash("Manu Ginobili"), hash("Spurs"), hash("Lakers") OVER * BIDIRECT UPTO 2 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Tony Parker")-[:serve]->("Spurs")> |
| <("Tony Parker")<-[:teammate]-("Manu Ginobili")> |
| <("Tony Parker")-[:like]->("Manu Ginobili")> |
| <("Tony Parker")-[:teammate]->("Manu Ginobili")> |
| path |
| <("Yao Ming")-[:like]->("Tracy McGrady")-[:serve]->("Spurs")> |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:serve]->("Lakers")> |
| <("Tony Parker")-[:serve]->("Spurs")> |
| <("Tony Parker")<-[:teammate]-("Manu Ginobili")> |
| <("Tony Parker")-[:like]->("Manu Ginobili")> |
| <("Tony Parker")-[:teammate]->("Manu Ginobili")> |

Scenario: Integer Vid [3] Shortest Path BIDIRECT
When executing query:
Expand Down
35 changes: 26 additions & 9 deletions tests/tck/features/path/ShortestPath.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ Feature: Shortest Path
| path |
| <("Tiago Splitter")-[:like]->("Tim Duncan")-[:teammate]->("LaMarcus Aldridge")> |

Scenario: [6] SinglePair Shortest Path limit steps
When executing query:
"""
FIND SHORTEST PATH FROM "Tiago Splitter" TO "Tony Parker" OVER * UPTO 1 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
When executing query:
"""
FIND SHORTEST PATH FROM "Tiago Splitter" TO "Tim Duncan" OVER * UPTO 1 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Tiago Splitter")-[:like]->("Tim Duncan")> |

Scenario: [1] MultiPair Shortest Path
When executing query:
"""
Expand Down Expand Up @@ -109,10 +124,10 @@ Feature: Shortest Path
FIND SHORTEST PATH FROM "Yao Ming" TO "Tim Duncan", "Spurs", "Lakers" OVER * UPTO 2 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:like]->("Tim Duncan") |
| <("Yao Ming")-[:like]->("Tracy McGrady")-[:serve]->("Spurs")> |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:serve]->("Lakers")> |
| path |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:like]->("Tim Duncan")> |
| <("Yao Ming")-[:like]->("Tracy McGrady")-[:serve]->("Spurs")> |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:serve]->("Lakers")> |

Scenario: [5] MultiPair Shortest Path
When executing query:
Expand Down Expand Up @@ -399,11 +414,13 @@ Feature: Shortest Path
FIND SHORTEST PATH FROM "Tony Parker", "Yao Ming" TO "Manu Ginobili", "Spurs", "Lakers" OVER * BIDIRECT UPTO 2 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Tony Parker")-[:serve]->("Spurs")> |
| <("Tony Parker")<-[:teammate]-("Manu Ginobili")> |
| <("Tony Parker")-[:like]->("Manu Ginobili")> |
| <("Tony Parker")-[:teammate]->("Manu Ginobili")> |
| path |
| <("Yao Ming")-[:like]->("Tracy McGrady")-[:serve]->("Spurs")> |
| <("Yao Ming")-[:like]->("Shaquile O'Neal")-[:serve]->("Lakers")> |
| <("Tony Parker")-[:serve]->("Spurs")> |
| <("Tony Parker")<-[:teammate]-("Manu Ginobili")> |
| <("Tony Parker")-[:like]->("Manu Ginobili")> |
| <("Tony Parker")-[:teammate]->("Manu Ginobili")> |

Scenario: [3] Shortest Path BIDIRECT
When executing query:
Expand Down

0 comments on commit b0af2be

Please sign in to comment.