github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/internal/examples/loopexamples/loop_Of_loop_S_test.go (about) 1 package loopexamples 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 8 "github.com/m4gshm/gollections/loop" 9 ) 10 11 func Test_LoopOf_LoopS(t *testing.T) { 12 13 var ( 14 ints = loop.Of(1, 2, 3) 15 strings = loop.S([]string{"a", "b", "c"}) 16 ) 17 18 assert.Equal(t, []int{1, 2, 3}, ints.Slice()) 19 assert.Equal(t, []string{"a", "b", "c"}, strings.Slice()) 20 }