File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ func TestMarshalForm(t *testing.T) {
133133 StructSlice []testSubStruct `json:"struct_slice,omitempty"`
134134 OptInt * int `json:"opt_int,omitempty"`
135135 OptBool * bool `json:"opt_bool,omitempty"`
136+ OptBoolNullable * bool `json:"opt_bool_nullable"`
136137 OptString * string `json:"opt_string,omitempty"`
137138 OptStruct * testSubStruct `json:"opt_struct,omitempty"`
138139 OptStructSlice * []testSubStruct `json:"opt_struct_slice,omitempty"`
@@ -151,6 +152,7 @@ func TestMarshalForm(t *testing.T) {
151152 },
152153 "opt_int=456" : {OptInt : func (v int ) * int { return & v }(456 )},
153154 "opt_bool=true" : {OptBool : func (v bool ) * bool { return & v }(true )},
155+ "" : {OptBoolNullable : nil },
154156 "opt_string=def" : {OptString : func (v string ) * string { return & v }("def" )},
155157 "opt_struct[int]=456&opt_struct[string]=def" : {OptStruct : & testSubStruct {Int : 456 , String : "def" }},
156158 "opt_struct_slice[0][int]=123&opt_struct_slice[0][string]=abc&opt_struct_slice[1][int]=456&opt_struct_slice[1][string]=def" : {
You can’t perform that action at this time.
0 commit comments