Skip to content

Commit

Permalink
Rename test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jschaf authored and jackc committed Feb 6, 2024
1 parent 797890a commit d0df6f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion numeric.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion numeric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit d0df6f7

Please sign in to comment.