Files
sqlite3/internal/util/pointer_test.go

16 lines
272 B
Go
Raw Normal View History

2024-01-03 00:54:30 +00:00
package util_test
import (
"math"
"testing"
"github.com/ncruces/go-sqlite3/internal/util"
)
func TestUnwrapPointer(t *testing.T) {
p := util.Pointer[float64]{Value: math.Pi}
if got := util.UnwrapPointer(p); got != math.Pi {
t.Errorf("want π, got %v", got)
}
}