This commit is contained in:
Nuno Cruces
2024-10-18 12:57:22 +01:00
parent ace01b2927
commit f18561ee11
5 changed files with 14 additions and 12 deletions

View File

@@ -1,15 +1,13 @@
package util_test
package util
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 {
p := Pointer[float64]{Value: math.Pi}
if got := UnwrapPointer(p); got != math.Pi {
t.Errorf("want π, got %v", got)
}
}