Skip to content

Commit

Permalink
fix pointer test
Browse files Browse the repository at this point in the history
  • Loading branch information
tigh-latte committed May 9, 2024
1 parent e904ed6 commit 6270911
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ func Test_MarshalForm(t *testing.T) {
Ptr *marshaler
NilPtr *marshaler
Struct marshaler
Slice []*marshaler
Slice []marshaler
SlicePtr []*marshaler
}{
Ptr: &marshaler{
Expand All @@ -1622,7 +1622,7 @@ func Test_MarshalForm(t *testing.T) {
Fname: "Bob",
Sname: "Dylan",
},
Slice: []*marshaler{{
Slice: []marshaler{{
Fname: "Danny",
Sname: "Devito",
}, {
Expand All @@ -1642,8 +1642,7 @@ func Test_MarshalForm(t *testing.T) {
Equal(t, values["Ptr"], []string{"John", "Smith"})
Equal(t, values["NilPointer"], nil)
Equal(t, values["Struct"], []string{"Bob", "Dylan"})
Equal(t, values["Slice[0]"], []string{"Danny", "Devito"})
Equal(t, values["Slice[1]"], []string{"Arnold", "Schwarzenegger"})
Equal(t, values["Slice"], []string{"Danny", "Devito", "Arnold", "Schwarzenegger"})
Equal(t, values["SlicePtr[0]"], []string{"Mary-Kate", "Olsen"})
Equal(t, values["SlicePtr[1]"], []string{"Ashley", "Olsen"})
}
Expand Down

0 comments on commit 6270911

Please sign in to comment.