updated dependencies and go
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/rfctime"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/timeext"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/tst"
|
||||
@@ -54,7 +53,7 @@ func TestReflectionGetFieldType(t *testing.T) {
|
||||
A: "4",
|
||||
},
|
||||
Str: "3",
|
||||
Ptr: langext.Ptr(4),
|
||||
Ptr: new(4),
|
||||
MDate: t1,
|
||||
ODate: nil,
|
||||
}
|
||||
@@ -208,7 +207,7 @@ func TestReflectionGetFieldValueAsTokenString(t *testing.T) {
|
||||
A: "2",
|
||||
},
|
||||
Str: "3",
|
||||
Ptr: langext.Ptr(4),
|
||||
Ptr: new(4),
|
||||
Num: 22,
|
||||
FFF: 22.5,
|
||||
Ptr2: nil,
|
||||
@@ -239,8 +238,7 @@ func TestReflectionWithInterface(t *testing.T) {
|
||||
CDate time.Time `bson:"cdate"`
|
||||
}
|
||||
|
||||
type TestInterface interface {
|
||||
}
|
||||
type TestInterface any
|
||||
|
||||
coll1 := W[TestInterface](&mongo.Collection{})
|
||||
|
||||
@@ -256,6 +254,6 @@ func TestReflectionWithInterface(t *testing.T) {
|
||||
tst.AssertTrue(t, coll2.coll != nil)
|
||||
tst.AssertEqual(t, 1, len(coll2.implDataTypeMap))
|
||||
|
||||
tst.AssertEqual(t, "ID", coll2.implDataTypeMap[reflect.TypeOf(TestData{})]["_id"].Name)
|
||||
tst.AssertEqual(t, "CDate", coll2.implDataTypeMap[reflect.TypeOf(TestData{})]["cdate"].Name)
|
||||
tst.AssertEqual(t, "ID", coll2.implDataTypeMap[reflect.TypeFor[TestData]()]["_id"].Name)
|
||||
tst.AssertEqual(t, "CDate", coll2.implDataTypeMap[reflect.TypeFor[TestData]()]["cdate"].Name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user