import files, add README & LICENSE
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package cursor
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDereferenceSlice(t *testing.T) {
|
||||
a, b := 1, 2
|
||||
result := DereferenceSlice([]*int{&a, nil, &b})
|
||||
assert.Equal(t, []int{1, 2}, result)
|
||||
assert.Empty(t, DereferenceSlice([]*int{}))
|
||||
assert.Empty(t, DereferenceSlice[int](nil))
|
||||
}
|
||||
Reference in New Issue
Block a user