github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/internal/examples/sliceexamples/slice_Of_test.go (about)

     1  package sliceexamples
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/m4gshm/gollections/slice"
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func Test_SliceOf(t *testing.T) {
    11  
    12  	var s = slice.Of(1, 3, -1, 2, 0) //[]int{1, 3, -1, 2, 0}
    13  
    14  	assert.Equal(t, []int{1, 3, -1, 2, 0}, s)
    15  }