mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 23:46:56 +00:00
17 lines
320 B
Go
17 lines
320 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func Test_InvertElements(t *testing.T) {
|
||
|
elems := []interface{}{"a", "b", "c"}
|
||
|
elemsInverted := InvertElements(elems)
|
||
|
|
||
|
assert.Equal(t, "a", elemsInverted[2])
|
||
|
assert.Equal(t, "b", elemsInverted[1])
|
||
|
assert.Equal(t, "c", elemsInverted[0])
|
||
|
}
|