Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Nov 4, 2021
1 parent da117c7 commit 9314898
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 0 deletions.
65 changes: 65 additions & 0 deletions tests/tck/features/match/Base.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,71 @@ Feature: Basic match
| [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |

Scenario: filter evaluable
When executing query:
"""
match (v:player{age: -1}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |
| ("Null1" :player{age: -1, name: __NULL__}) |
When executing query:
"""
match (v:player{age: +20}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |
| ("Luka Doncic" :player{age: 20, name: "Luka Doncic"}) |
When executing query:
"""
match (v:player{age: 1+19}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |
| ("Luka Doncic" :player{age: 20, name: "Luka Doncic"}) |
When executing query:
"""
match (v:player)-[e:like{likeness:-1}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
| [:like "Blake Griffin"->"Chris Paul" @0 {likeness: -1}] |
| [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] |
When executing query:
"""
match (v:player)-[e:like{likeness:40+50+5}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
| [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| [:like "Paul George"->"Russell Westbrook" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
When executing query:
"""
match (v:player)-[e:like{likeness:4*20+5}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
| [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| [:like "Paul George"->"Russell Westbrook" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
When executing query:
"""
match (v:player)-[e:like{likeness:"99"}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
When executing query:
"""
match (v:player{age:"24"-1}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |

Scenario: No return
When executing query:
"""
Expand Down
65 changes: 65 additions & 0 deletions tests/tck/features/match/Base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,71 @@ Feature: Basic match
| [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |

Scenario: filter evaluable
When executing query:
"""
match (v:player{age: -1}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |
| ("Null1" :player{age: -1, name: __NULL__}) |
When executing query:
"""
match (v:player{age: +20}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |
| ("Luka Doncic" :player{age: 20, name: "Luka Doncic"}) |
When executing query:
"""
match (v:player{age: 1+19}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |
| ("Luka Doncic" :player{age: 20, name: "Luka Doncic"}) |
When executing query:
"""
match (v:player)-[e:like{likeness:-1}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
| [:like "Blake Griffin"->"Chris Paul" @0 {likeness: -1}] |
| [:like "Rajon Rondo"->"Ray Allen" @0 {likeness: -1}] |
When executing query:
"""
match (v:player)-[e:like{likeness:40+50+5}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
| [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| [:like "Paul George"->"Russell Westbrook" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
When executing query:
"""
match (v:player)-[e:like{likeness:4*20+5}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
| [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] |
| [:like "Paul George"->"Russell Westbrook" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] |
When executing query:
"""
match (v:player)-[e:like{likeness:"99"}]->() return e
"""
Then the result should be, in any order, with relax comparison:
| e |
When executing query:
"""
match (v:player{age:"24"-1}) return v
"""
Then the result should be, in any order, with relax comparison:
| v |

Scenario: No return
When executing query:
"""
Expand Down

0 comments on commit 9314898

Please sign in to comment.