Skip to content

Commit

Permalink
Added additional unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ziflex committed Mar 26, 2024
1 parent 9d89d9e commit 72bbfcf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/compiler/compiler_for_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ func TestFor(t *testing.T) {
[]any{map[string]any{"a": 1}, map[string]any{"a": 2}, map[string]any{"a": 3}},
ShouldEqualJSON,
},
{
`FOR val IN 1..3
FOR prop IN ["a"]
RETURN {[prop]: val}`,
[]any{map[string]any{"a": 1}, map[string]any{"a": 2}, map[string]any{"a": 3}},
ShouldEqualJSON,
},
{
`FOR prop IN ["a"]
FOR val IN 1..3
RETURN {[prop]: val}`,
[]any{map[string]any{"a": 1}, map[string]any{"a": 2}, map[string]any{"a": 3}},
ShouldEqualJSON,
},
{
`FOR prop IN ["a"]
FOR val IN [1, 2, 3]
Expand Down

0 comments on commit 72bbfcf

Please sign in to comment.