|
@@ -784,7 +784,7 @@ type AssignTagToSlice struct {
|
|
|
ChanPointerSliceField []*chan any
|
|
|
FuncPointerSliceField []*func() string
|
|
|
FromStringSliceToStringField string
|
|
|
- FromTimeToStringField string
|
|
|
+ FromTimeToStringField []string
|
|
|
FromStringToTimeField []time.Time
|
|
|
}
|
|
|
|
|
@@ -881,8 +881,8 @@ func (to AssignTagToSlice) checkFields(t *testing.T, from AssignTagFromSlice) {
|
|
|
strings.Join(from.FromStringSliceToStringField, "::"), to.FromStringSliceToStringField))
|
|
|
}
|
|
|
|
|
|
- for _, value := range from.FromTimeToStringField {
|
|
|
- if value.Format(time.DateTime) != to.FromTimeToStringField {
|
|
|
+ for i, value := range from.FromTimeToStringField {
|
|
|
+ if value.Format(time.DateTime) != to.FromTimeToStringField[i] {
|
|
|
t.Fatalf("%+v\n", errors.Errorf("FromTimeToStringField not equal: from %v, to %v",
|
|
|
value.Format(time.DateTime), to.FromTimeToStringField))
|
|
|
}
|
|
@@ -946,8 +946,8 @@ func (to AssignTagToSlice) checkNil(t *testing.T) {
|
|
|
t.Fatalf("%+v\n", errors.Errorf("FromStringSliceToStringField not zero"))
|
|
|
}
|
|
|
|
|
|
- if to.FromTimeToStringField != "" {
|
|
|
- t.Fatalf("%+v\n", errors.Errorf("FromTimeToStringField not zero"))
|
|
|
+ if to.FromTimeToStringField != nil {
|
|
|
+ t.Fatalf("%+v\n", errors.Errorf("FromTimeToStringField not nil"))
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -966,7 +966,7 @@ type AssignTagToSlicePointerField struct {
|
|
|
ChanPointerSliceField *[]*chan any
|
|
|
FuncPointerSliceField *[]*func() string
|
|
|
FromStringSliceToStringField *string
|
|
|
- FromTimeToStringField *string
|
|
|
+ FromTimeToStringField *[]string
|
|
|
FromStringToTimeField []time.Time
|
|
|
}
|
|
|
|
|
@@ -1063,8 +1063,8 @@ func (to AssignTagToSlicePointerField) checkFields(t *testing.T, from AssignTagF
|
|
|
strings.Join(from.FromStringSliceToStringField, "::"), *to.FromStringSliceToStringField))
|
|
|
}
|
|
|
|
|
|
- for _, value := range from.FromTimeToStringField {
|
|
|
- if value.Format(time.DateTime) != *to.FromTimeToStringField {
|
|
|
+ for i, value := range from.FromTimeToStringField {
|
|
|
+ if value.Format(time.DateTime) != (*to.FromTimeToStringField)[i] {
|
|
|
t.Fatalf("%+v\n", errors.Errorf("FromTimeToStringField not equal: from %v, to %v",
|
|
|
value.Format(time.DateTime), to.FromTimeToStringField))
|
|
|
}
|