Skip to content

Commit

Permalink
fix walk call test
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 committed Nov 2, 2024
1 parent 39de2f9 commit 585513b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions walk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ func TestWalkCall(t *testing.T) {
}
require.True(t, slices.Contains(tc.valueTypes, c.Func.ReturnType))
for i, arg := range c.Args {
// Only happen for functions with variadic set to -1 like label_join.
// Hardcode its value to ensure it is string type.
if i >= len(c.Func.ArgTypes) {
require.Equal(t, parser.ValueTypeString, arg.Type())
continue
}
require.Equal(t, c.Func.ArgTypes[i], arg.Type())
}
})
Expand Down

0 comments on commit 585513b

Please sign in to comment.