mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-26 08:30:21 +08:00
This reverts commit ef397cab50.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package jsonUtil
|
||||
|
||||
import (
|
||||
go_easy_utils "github.com/jefferyjob/go-easy-utils/v2"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
@@ -43,8 +44,8 @@ func TestToFloat64(t *testing.T) {
|
||||
{true, 1, nil},
|
||||
{false, 0, nil},
|
||||
{(*bool)(nil), 0, nil},
|
||||
{make(chan int), 0, ErrType},
|
||||
{"abc", 0, ErrSyntax},
|
||||
{make(chan int), 0, go_easy_utils.ErrType},
|
||||
{"abc", 0, go_easy_utils.ErrSyntax},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
@@ -89,7 +90,7 @@ func TestToFloat64Pointer(t *testing.T) {
|
||||
name: "invalid string input",
|
||||
input: stringPtr("abc"),
|
||||
expectedValue: 0,
|
||||
expectedError: ErrSyntax,
|
||||
expectedError: go_easy_utils.ErrSyntax,
|
||||
},
|
||||
{
|
||||
name: "valid string input",
|
||||
@@ -185,7 +186,7 @@ func TestToFloat64Pointer(t *testing.T) {
|
||||
name: "unsupported input type",
|
||||
input: "unsupported",
|
||||
expectedValue: 0,
|
||||
expectedError: ErrSyntax,
|
||||
expectedError: go_easy_utils.ErrSyntax,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user