Closed
Description
What version of protobuf and what language are you using?
Version: v1.4.2
What did you do?
https://github.com/AlekSi/go-bug/tree/master/jsonpb
func TestDuration(t *testing.T) {
d := -time.Nanosecond
dp := ptypes.DurationProto(d)
m := &jsonpb.Marshaler{}
s, err := m.MarshalToString(dp)
if err != nil {
t.Fatal(err)
}
if s != `"-0.000000001s"` {
t.Errorf("Unexpected result: %s", s)
}
}
What did you expect to see?
"-0.000000001s"
What did you see instead?
Unexpected result: "0.-00000001s"
Anything else we should know about your project / environment?
Issue #883 is back for 1.4.2.
Metadata
Metadata
Assignees
Labels
No labels