Skip to content

Commit

Permalink
add more test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Dec 28, 2021
1 parent f4d99a0 commit cca7f0f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tests/tck/features/match/Base.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,31 @@ Feature: Basic match
"""
Then a SemanticError should be raised at runtime: result of (-9223372036854775808-1) cannot be represented as an integer

Scenario: Une step
Scenario: One step
When executing query:
"""
MATCH (v1:player{name: "LeBron James"}) -[r]-> (v2)
RETURN type(r) AS Type, CASE WHEN v2.tea.name IS NOT NULL THEN v2.tea.name WHEN v2.playe.name IS NOT NULL THEN v2.playe.name ELSE "abc" END AS Name
"""
Then the result should be, in any order:
| Type | Name |
| "like" | "abc" |
| "serve" | "abc" |
| "serve" | "abc" |
| "serve" | "abc" |
| "serve" | "abc" |
When executing query:
"""
MATCH (v1:player{name: "LeBron James"}) -[r]-> (v2)
RETURN type(r) AS Type, CASE WHEN v2.tea.name IS NOT NULL THEN v2.tea.name WHEN v2.playe.name IS NOT NULL THEN v2.playe.name END AS Name
"""
Then the result should be, in any order:
| Type | Name |
| "like" | NULL |
| "serve" | NULL |
| "serve" | NULL |
| "serve" | NULL |
| "serve" | NULL |
When executing query:
"""
MATCH (v1:player{name: "LeBron James"}) -[r]-> (v2)
Expand Down
24 changes: 24 additions & 0 deletions tests/tck/features/match/Base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,30 @@ Feature: Basic match
Then a SemanticError should be raised at runtime: result of (-9223372036854775808-1) cannot be represented as an integer

Scenario: One step
When executing query:
"""
MATCH (v1:player{name: "LeBron James"}) -[r]-> (v2)
RETURN type(r) AS Type, CASE WHEN v2.tea.name IS NOT NULL THEN v2.tea.name WHEN v2.playe.name IS NOT NULL THEN v2.playe.name ELSE "abc" END AS Name
"""
Then the result should be, in any order:
| Type | Name |
| "like" | "abc" |
| "serve" | "abc" |
| "serve" | "abc" |
| "serve" | "abc" |
| "serve" | "abc" |
When executing query:
"""
MATCH (v1:player{name: "LeBron James"}) -[r]-> (v2)
RETURN type(r) AS Type, CASE WHEN v2.tea.name IS NOT NULL THEN v2.tea.name WHEN v2.playe.name IS NOT NULL THEN v2.playe.name END AS Name
"""
Then the result should be, in any order:
| Type | Name |
| "like" | NULL |
| "serve" | NULL |
| "serve" | NULL |
| "serve" | NULL |
| "serve" | NULL |
When executing query:
"""
MATCH (v1:player{name: "LeBron James"}) -[r]-> (v2)
Expand Down

0 comments on commit cca7f0f

Please sign in to comment.