github.com/ncruces/go-sqlite3@v0.15.1-0.20240520133447-53eef1510ff0/internal/util/pointer_test.go (about)

     1  package util_test
     2  
     3  import (
     4  	"math"
     5  	"testing"
     6  
     7  	"github.com/ncruces/go-sqlite3/internal/util"
     8  )
     9  
    10  func TestUnwrapPointer(t *testing.T) {
    11  	p := util.Pointer[float64]{Value: math.Pi}
    12  	if got := util.UnwrapPointer(p); got != math.Pi {
    13  		t.Errorf("want π, got %v", got)
    14  	}
    15  }