Skip to content

Commit

Permalink
add in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgoodhouse committed Nov 19, 2019
1 parent 46a719c commit f838abd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lang/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,17 @@ func TestFunctions(t *testing.T) {
},
},

"setdifference": {
{
`setdifference(["a", "b"], ["a", "c"], ["a", "d"])`,
cty.SetVal([]cty.Value{
cty.StringVal("b"),
cty.StringVal("c"),
cty.StringVal("d"),
}),
},
},

"setintersection": {
{
`setintersection(["a", "b"], ["b", "c"], ["b", "d"])`,
Expand All @@ -666,6 +677,15 @@ func TestFunctions(t *testing.T) {
},
},

"setsubtract": {
{
`setsubtract(["a", "b", "c"], ["a", "c"])`,
cty.SetVal([]cty.Value{
cty.StringVal("b"),
}),
},
},

"setunion": {
{
`setunion(["a", "b"], ["b", "c"], ["d"])`,
Expand Down

0 comments on commit f838abd

Please sign in to comment.