gopass/pkg/set/map_test.go
Dominik Schulz 1e05f6a618
[chore] Move set from internal to pkg (#3129)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-04-19 20:29:24 +02:00

20 lines
347 B
Go

package set
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMapFunc(t *testing.T) {
t.Parallel()
assert.Equal(t, map[int]bool{1: true, 2: true, 3: true}, Map([]int{1, 2, 3}))
}
func TestApplyFunc(t *testing.T) {
t.Parallel()
assert.Equal(t, []int{2, 3, 4}, Apply([]int{1, 2, 3}, func(i int) int { return i + 1 }))
}