github.com/ydb-platform/ydb-go-sdk/v3@v3.89.2/internal/xslices/map_test.go (about)

     1  package xslices
     2  
     3  import (
     4  	"strconv"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  func TestMap(t *testing.T) {
    11  	require.Equal(t,
    12  		map[string]int{
    13  			"1": 1,
    14  			"2": 2,
    15  			"3": 3,
    16  		},
    17  		Map([]int{1, 2, 3}, strconv.Itoa),
    18  	)
    19  }