From d0df6f7e48f6b29bed4483b216a8b45a6566308b Mon Sep 17 00:00:00 2001 From: Joe Schafer Date: Mon, 5 Feb 2024 12:11:27 -0800 Subject: [PATCH] Rename test case --- numeric.go | 2 +- numeric_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/numeric.go b/numeric.go index 5999eaf..c654542 100644 --- a/numeric.go +++ b/numeric.go @@ -448,7 +448,7 @@ func (src *Numeric) toFloat64() (float64, error) { return math.Inf(-1), nil } - if src.Exp == 1 { + if src.Exp == 0 { return float64(src.Int.Int64()), nil } diff --git a/numeric_test.go b/numeric_test.go index 02d5701..9d2045d 100644 --- a/numeric_test.go +++ b/numeric_test.go @@ -445,7 +445,7 @@ func TestNumericSmallNegativeValues(t *testing.T) { } // https://github.com/jackc/pgtype/issues/210 -func TestNumericFloat64FromIntegers(t *testing.T) { +func TestNumericFloat64Exhaustive(t *testing.T) { for exp := -10; exp <= 10; exp++ { for i := -100; i < 100; i++ { n := pgtype.Numeric{