Skip to content

Commit

Permalink
fixup unit test for hashed map in expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 committed Jun 6, 2024
1 parent 7a9aa34 commit 73785ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/tcl/expressionstcl/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ a:
assert.Equal(t, `[0,2,4,6,8]`, MustCompile(`map([10,20,30,40,50], "_.index * 2")`).String())
assert.Equal(t, `[2,4,6,8,10]`, MustCompile(`map([1,2,3,4,5], "_.value * 2")`).String())
assert.Equal(t, `[0,2,4,6,8]`, MustCompile(`map([10,20,30,40,50], "_.index * 2")`).String())
assert.Equal(t, `[{"key":"A","value":"B"},{"key":"C","value":5}]`, MustCompile(`entries({"A": "B", "C": 5})`).String())
assert.ElementsMatch(t, []interface{}{MapEntry{Key: "A", Value: "B"}, MapEntry{Key: "C", Value: 5.0}}, must(MustCompile(`entries({"A": "B", "C": 5})`).Static().SliceValue()))
assert.Equal(t, `[3,4,5]`, MustCompile(`filter([1,2,3,4,5], "_.value > 2")`).String())
assert.Equal(t, `[5]`, MustCompile(`jq([1,2,3,4,5], ". | max")`).String())
assert.Equal(t, `[{"b":{"v":2}}]`, MustCompile(`jq([{"a":{"v": 1}},{"b":{"v": 2}}], ". | max_by(.v)")`).String())
Expand Down

0 comments on commit 73785ea

Please sign in to comment.