mirror of
https://github.com/gopasspw/gopass.git
synced 2026-05-30 11:18:48 +02:00
1e05f6a618
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
20 lines
347 B
Go
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 }))
|
|
}
|