Skip to content

Commit

Permalink
Add Map() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzei committed Nov 1, 2023
1 parent 289a135 commit 07edba1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fieldapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ func TestFieldArray(t *testing.T) {
type myGenericArray[T any] []T
Array("array", myGenericArray[any]{})
}

func TestFieldMap(t *testing.T) {
Map("array", map[string]any{})
Map("array", map[int]any{})

type myMap map[string]string
Map("array", myMap{})

type myGenericMap[K comparable, V any] map[K]V
Map("array", myGenericMap[int, any]{})
}

0 comments on commit 07edba1

Please sign in to comment.