Download pkg/slicesx/normalize_test.go from Leon4gr45/openmeter: direct link, hf CLI and curl.
- Browser
- Download file 331 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openmeter/resolve/main/pkg/slicesx/normalize_test.go
- Command line
-
hf download hf://spaces/Leon4gr45/openmeter/pkg/slicesx/normalize_test.go
-
curl -L -o normalize_test.go https://huggingface.co/spaces/Leon4gr45/openmeter/resolve/main/pkg/slicesx/normalize_test.go
331 Bytes
| package slicesx | |
| import ( | |
| "testing" | |
| "github.com/stretchr/testify/require" | |
| ) | |
| func TestNormalize(t *testing.T) { | |
| require.Equal(t, []string{"api-calls", "storage"}, Normalize([]string{"storage", "api-calls", "storage"})) | |
| require.Equal(t, []int{1, 2, 3}, Normalize([]int{3, 1, 2, 1})) | |
| require.Nil(t, Normalize([]string(nil))) | |
| } | |