Files
releases/util/maps_test.go
T
Tyler Schade 5226cf3137 add ability for opa inspect to inspect a single file outside of any bundle (#6873)
add ability for opa inspect to inspect a single file outside of any bundle

Signed-off-by: Tyler Schade <tyler.schade@solo.io>
2024-07-21 20:22:52 +02:00

19 lines
368 B
Go

package util
import (
"slices"
"testing"
)
func TestValues(t *testing.T) {
testMap := map[string]int{"a": 1, "b": 2, "c": 3}
values := Values(testMap)
if len(values) != 3 {
t.Errorf("Expected 3 values, got %d", len(values))
}
slices.Sort(values)
if values[0] != 1 || values[1] != 2 || values[2] != 3 {
t.Errorf("Expected [1, 2, 3], got %v", values)
}
}