@@ -94,6 +94,7 @@ func TestPopulateParameters(t *testing.T) {
9494 durationStr := durationT .String ()
9595 durationPb := durationpb .New (durationT )
9696
97+ optionalStr := "str"
9798 fieldmaskStr := "float_value,double_value"
9899 fieldmaskPb := & field_mask.FieldMask {Paths : []string {"float_value" , "double_value" }}
99100
@@ -134,6 +135,7 @@ func TestPopulateParameters(t *testing.T) {
134135 "string_value" : {"str" },
135136 "bytes_value" : {"YWJjMTIzIT8kKiYoKSctPUB-" },
136137 "repeated_value" : {"a" , "b" , "c" },
138+ "optional_value" : {optionalStr },
137139 "repeated_message" : {"1" , "2" , "3" },
138140 "enum_value" : {"1" },
139141 "repeated_enum" : {"1" , "2" , "0" },
@@ -184,6 +186,7 @@ func TestPopulateParameters(t *testing.T) {
184186 StringValue : "str" ,
185187 BytesValue : []byte ("abc123!?$*&()'-=@~" ),
186188 RepeatedValue : []string {"a" , "b" , "c" },
189+ OptionalValue : & optionalStr ,
187190 RepeatedMessage : []* wrapperspb.UInt64Value {{Value : 1 }, {Value : 2 }, {Value : 3 }},
188191 EnumValue : examplepb .EnumValue_Y ,
189192 RepeatedEnum : []examplepb.EnumValue {examplepb .EnumValue_Y , examplepb .EnumValue_Z , examplepb .EnumValue_X },
@@ -499,7 +502,7 @@ func TestPopulateParameters(t *testing.T) {
499502 values : url.Values {
500503 "timestampValue" : {"0000-01-01T00:00:00.00Z" },
501504 },
502- filter : utilities .NewDoubleArray (nil ),
505+ filter : utilities .NewDoubleArray (nil ),
503506 want : & examplepb.Proto3Message {},
504507 wanterr : errors .New (`parsing field "timestamp_value": 0000-01-01T00:00:00.00Z before 0001-01-01` ),
505508 },
0 commit comments